Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Variable Excel

Hello,
I show you my idea, I Would you my terms of fattening and expressions analysis in Excel File Not With Variables, and then my recharger Initiation and Variables USE In My objects, but I can not part Manage aside reload QlikView, somebody can explain to me the process please e a small example application.
Thank you for your help
Regards,
Maurice

1 Solution

Accepted Solutions
Highlighted
Master
Master

Re: Variable Excel

No this is not correct, that load script will automatically loop through and create all 1500 variables.

Maurice please see here for the example from Qlik IT

Managing Variables

View solution in original post

7 Replies
Highlighted
Specialist III
Specialist III

Re: Variable Excel

Hi,

First create variable in dashboard:

Ctrl+Alt+v, create new variables.

Change expressions to variables

now create input box object and select expressions variables and export to excel

out of 3 columns delete "=" column and use below mentioned script to load the variables by giving appropriate path

Formulas:

LOAD Variable,

     Formula

     //Remarks

FROM

\\Desktop\Variables.xlsx

(ooxml, embedded labels, table is VariablesTab);

Let vNumberOfRows = NoOfRows('Formulas');

For vI = 0 to (vNumberOfRows - 1)

Let vVariable_Name = Peek('Variable',vI,'Formula');

Let [$(vVariable_Name)] = Peek('Formula',vI,'formula');

Next

Highlighted
Creator II
Creator II

Re: Variable Excel

Thank you very much  Sasi  V Kandragula,

Let vVariable_Name = Peek('Variable',vI,'Formula');

Let [$(vVariable_Name)] = Peek('Formula',vI,'formula');

Next

.

.....

I have to declare every variable here, I almost 1500 variable (expression)

Highlighted
Specialist III
Specialist III

Re: Variable Excel

Yes we need to declare all  expressions(Variables) in our dashboard.

Highlighted
Creator II
Creator II

Re: Variable Excel

In script? I can also declare in text file that reference the Excel file

Highlighted
Master
Master

Re: Variable Excel

No this is not correct, that load script will automatically loop through and create all 1500 variables.

Maurice please see here for the example from Qlik IT

Managing Variables

View solution in original post

Highlighted
Specialist III
Specialist III

Re: Variable Excel

If we place all variable sin excel sheet and load above mentioned script

Let vNumberOfRows = NoOfRows('Formulas');

For vI = 0 to (vNumberOfRows - 1)

Let vVariable_Name = Peek('Variable',vI,'Formula');

Let [$(vVariable_Name)] = Peek('Formula',vI,'formula');

Next

It will load all 1500 variables..not required any code change or manual declaration of each variable.

Highlighted
Creator II
Creator II

Re: Variable Excel

Thank you very much Adam