Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to include variables inside variables in script?

Hello everyone,

I am trying to pass all my expression to the script, so that it will be easier to maintain and Debug.

However i am struggling with including an expression within another expression in the script.

Outside the script when i create the variables through the "Variable Overview" window, they work, however i cannot make them work when they are created in the script.

I have tried many combinations but none result in what i expected.

In the script i wrote the following:

LET vPeriodSelectionSales      =      '=Max({1<FLAG_Sales = {1}, Month = P(Month), Year = P(Year)>} Period)';

LET vYearSelectionSales        =      '=Max({1<FLAG_Sales = {1}, Month = P(Month), Year = P(Year)>} Year)';

LET vPeriodYearBeginning      =      '=Min({1<FLAG_Sales = {1}, Month = P(Month), Year = {$(vYearSelectionSales)} >} Period)';


I tried using "", using SET instead of LET, and many other combinations, but I cannot make vPeriodYearBeginning work because it is calling another variable. How can i make this variable work?


Can anyone help me please?


Thank you in advance,

Susana

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

3 Replies
sunny_talwar
MVP
MVP

See if this thread is of any help: variables within variables in load script

MarcoWedel
MVP
MVP

Hi,

maybe parameterized variables could be a solution also.

regards

Marco

fkeuroglian
Partner - Master
Partner - Master

susana, how are you?

could you put your. qvw as an example, to be easier to help you?

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Susana como estas?

podrias subir el .qvw para ver donde esta el tema que no cargan las variables y asi sera mas facil ayudarte

saludos,

Fernando K.