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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

variables and Set Analysis

Can I hide entire set analysis expressions in variables, and then use just the variable in the chart expression tab?

Example: (I used "<=" to represent assignment)

vFixedYear <= 2009

vSelectedYear <= =GetFieldSelections(Year)

myVar  <= =Sum({1<Year = {$(vFixedYear), $(vSelectedYear)}>} Sales)

And then use myVar in the expressions tab INSTEAD of the set analysis expression that I assigned to myVar?

3 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Sure you can do that.

Assign myVar<= Sum({1<Year = {$(vFixedYear), $(vSelectedYear)}>} Sales) //Removed the equal symbol before the sum.

Not applicable
Author

But if I leave out the '=' then the value stored in myVar is merely a string that is the set analysis expression.  Maybe I'm missing something.  Ideas?

MayilVahanan

HI

Try like attached file

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.