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: 
curiousfellow
Specialist
Specialist

Store formulas/expressions in variables

To make expressions not to complicated, I stored some expressions in variables. The stored expressions contain variables too.

Should it be possible to use variables like this. For every dimension I get the same result now.

For example : stored in var1 = sum({<year={"=$(var_chosen_year)"}>}sales)

                                                var2 = sum({<year={"=$(var_compare_year)"}>}sales)

In my chart :

dimension : department

expression: $(var1)-$var(2)

 

 

Labels (2)
1 Solution

Accepted Solutions
curiousfellow
Specialist
Specialist
Author

SOLVED : I created the content of the variable starting with the "=" sign". Without that character it works 

View solution in original post

2 Replies
curiousfellow
Specialist
Specialist
Author

SOLVED : I created the content of the variable starting with the "=" sign". Without that character it works 

MayilVahanan
MVP
MVP

Hi

For Dynamic, remove the "=" equal sign from the formula and try like $(var1)

var1:

sum({<year={"=$(var_chosen_year)"}>}sales)

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