Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
wnorwood
Contributor III
Contributor III

Save Set Analysis expression with variable inside a variable

Hello,

I need to able to save the script for my Set Analysis into a variable during my Load that can be used in an Expression in a chart.  This works great except that it resolves the variable that is inside the Set Analysis and stores that value -- I need it to keep the text of the string. The variable gets set using actions when new values are selected from a multi-box object, so I need it to reflect that new value on the fly.

I have tried several combinations of SET and LET, single quotes and double quotes, and even tried concatenation of the $.  Does anyone have a solution to this dilemma?

Below is a sample of my Load script.  $(vMaxCounterRollingMonth) is the variable that it is resolving.

vMonthly = {$<[Period Counter Rolling Month]={$(vMaxCounterRollingMonth)},[Period Month]=,[Period Quarter]=,[Period Month Year]=,[Period Year]=>}

I am working in QlikView 12.

Thanks!

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

LET vMonthly = '{<[Period Counter Rolling Month]={' & '$' & '(vMaxCounterRollingMonth)},[Period Month]=,[Period Quarter]=,[Period Year]=>}';

Will prevent the $-sign expansion from being done in the load script. vMonthly will have the literal text of:


{<[Period Counter Rolling Month]={$(vMaxCounterRollingMonth)},[Period Month]=,[Period Quarter]=,[Period Year]=>}



View solution in original post

4 Replies
petter
Partner - Champion III
Partner - Champion III

LET vMonthly = '{<[Period Counter Rolling Month]={' & '$' & '(vMaxCounterRollingMonth)},[Period Month]=,[Period Quarter]=,[Period Year]=>}';

Will prevent the $-sign expansion from being done in the load script. vMonthly will have the literal text of:


{<[Period Counter Rolling Month]={$(vMaxCounterRollingMonth)},[Period Month]=,[Period Quarter]=,[Period Year]=>}



wnorwood
Contributor III
Contributor III
Author

Thank you so much! Works perfectly!

petter
Partner - Champion III
Partner - Champion III

Could you please mark the answer as "Answered" and/or "Helpful" please to close the thread.

wnorwood
Contributor III
Contributor III
Author

Done and done! Thanks again!