Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement like :
I will have an excel file. Which will have Key and Values.
From that excel I want to define the Variable.
As an example:
set vDBSchema1= should be AHPDW.AHPMart.
I am attaching the App. Could you please check and let me know the way out.
Thanks,
Sarif
If you have values in excel and you want to load them into Qlikview and create dynamic variables then follow the below code as example. I created all the variables in excel and loaded into qlikview to create dynamic variables. Hope this helps...
Variables_tmp:
Load
Name,
Expression,
Comment
FROM
(
// Create Variables
Let vNoOfVariables = FieldValueCount('Name');
For i = 0 to $(vNoOfVariables) - 1
Let vName = Peek('Name',i,'Variables_tmp');
Let vComment = Peek('Comment',i,'Variables_tmp');
Let $(vName) = Peek('Expression',i,'Variables_tmp') & CHR(10) & '// $(vComment)';
Next i
Drop Table Variables_tmp;
// Drop below variables and also go to Settings--->Variables Overview and then delete vName,vComment,vNoOfVariables and i varibales manually.
Set vName=;
Set vComment=;
Set vNoOfVariables=;
Set i=;
Create below excel file
Variables_List.xlsx <------ This is Excel file
Name Expression Comment
Revenue Sum(Orders*Price) Total Revenue
Try something like
temp:
Load Value as Requiredvalue from AHPConfig where Key = 'vDBSchema';
LET vDBSchema1 = Peek('Requiredvalue');
drop table temp;