Dynamic Loading of Tables in Qlikview/Qliksense

Capture.PNG

 

Set dataManagerTables = ”,’FinalItemMaster’,’AggSales’,’CustomerAddress’,’Customers’,’FinalItemBranch’,’FinalSalesHeader’,’FinalYTDBudget’,’Province’,’Sales’,’US STATES’,’SalesDetails2′,’Dates3′;
//This block renames script tables from non generated section which conflict with the names of managed tables

For each name in $(dataManagerTables)
Let index = 0;
Let currentName = name;
Let tableNumber = TableNumber(name);
Let matches = 0;
Do while not IsNull(tableNumber) or (index > 0 and matches > 0)
index = index + 1;
currentName = name & ‘-‘ & index;
tableNumber = TableNumber(currentName)
matches = Match(‘$(currentName)’, $(dataManagerTables));
Loop
If index > 0 then
Rename Table ‘$(name)’ to ‘$(currentName)’;
EndIf;
Next;
Set dataManagerTables = ;

Advertisements

100 Ways

100-Ways-to-Motivate-Others

andu korralu – Foxtail Millets
korralu – Foxtail Millets
arikelu – Kodo Millets
samalu – Little Millets
varigalu – Proso Millets

https://drive.google.com/file/d/1sLG2juCAuamrlVT9fjuw4j_P8G2dLP0D/view https://drive.google.com/file/d/1ioXu5n2OIyH-XC03lgMzU9YuwPoYQbAs/view

__https://www.youtube.com/watch?v=owuMdgHXgzI

How to show max date and its Sales?

https://community.qlik.com/thread/316205

Use DATE#,Left functions. Search in Qlikview Help

Data:

Name Date Sales
Modi 07/10/2018 12:00:00 AM 9
Babu 11/09/2018 12:00:00 AM 3
Name3 20/07/2018 12:00:00 AM 5
Name1 20/09/2018 12:00:00 AM 0
Name2 21/08/2018 12:00:00 AM 0
Ramesh 21/08/2018 12:00:00 AM 2
John Saida 30/09/2018 12:00:00 AM 3
Gopi Raju 31/08/2018 12:00:00 AM 2

Check this thread:

https://community.qlik.com/thread/315995

Data:
LOAD * INLINE [
Name,Date,Sales
Gopi Raju,31/08/2018 12:00:00 AM,2
John Saida,30/09/2018 12:00:00 AM,3
Ramesh,21/08/2018 12:00:00 AM,2
Name1,20/09/2018 12:00:00 AM,0
Name2,21/08/2018 12:00:00 AM,0
Name3,20/07/2018 12:00:00 AM,5
Babu,11/09/2018 12:00:00 AM,3
Modi,07/10/2018 12:00:00 AM,9
];

Capture.JPG

Wildmatch / subfield Qlikview Notes

Hi,
I have the data like this.
Wants to pick GOPI,gopi,RAMESH,ramesh,SAIDA,saida as Name in a new column. How to do that?
Source Data:
sales_mrtyf_GOPI_09_2017
under_gopi_03_2015
sales_mrtyf_RAMESH_09_2017
under_rames_03_2015
sales_mrtyf_SAIDA_09_2017
under_saida_03_2015

Expected Data in Name column:

Field Name
sales_mrtyf_GOPI_09_2017 Juneboyina Gopi
under_gopi_03_2015 Juneboyina Gopi
sales_mrtyf_RAMESH_09_2017 Mocharla Ramesh
under_ramesh_03_2015 Mocharla Ramesh
sales_mrtyf_ASDF_09_2017 NA
under_xxxx_03_2015 NA
sales_mrtyf_SAIDA_09_2017 Shaik John Saida
under_saida_03_2015 Shaik John Saida

 

Example:

I have the source data like this.

LOAD * INLINE [
TimeField
sales_mrtyf_qtr_09_2017
under_QTR_03_2015
sales_mrtyf_month_09_2017
sales_mrtyf_MONTH_09_2017
under_year_03_2015
sales_mrtyf_YEAR_09_2017
sales_mrtyf_ASDF_09_2017
under_xxxx_03_2015
];

I want to show output like this.

TimeField Time
sales_mrtyf_ASDF_09_2017 NA
sales_mrtyf_MONTH_09_2017 Month
sales_mrtyf_month_09_2017 Month
sales_mrtyf_qtr_09_2017 Quarter
sales_mrtyf_YEAR_09_2017 Year
under_QTR_03_2015 Quarter
under_xxxx_03_2015 NA
under_year_03_2015 Year

//Script is this:

Data2:
LOAD *,if(WildMatch(TimeField,’*qtr*’),’Quarter’,

if(WildMatch(TimeField,’*month*’),’Month’,

if(WildMatch(TimeField,’*year*’),’Year’,
‘NA’)
)) as Time;
LOAD * INLINE [
TimeField
sales_mrtyf_qtr_09_2017
under_QTR_03_2015
sales_mrtyf_month_09_2017
sales_mrtyf_MONTH_09_2017
under_year_03_2015
sales_mrtyf_YEAR_09_2017
sales_mrtyf_ASDF_09_2017
under_xxxx_03_2015
];

 

Capture.PNG

Read this post

https://community.qlik.com/message/1554778#1554778