Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable Query

Just want to double check my understanding regarding variable

1) when variable definition in variable overview is prefixed with = it means  variable will be calculated once in a data model and whenever variable will use it will use the same value.

2) if variable is not prefixed with = ...calculation of variable will depend on the  expression where is it used ..may be static or dynamic depends..

please correct me if my understanding  is wrong

Many Thanks

1 Solution

Accepted Solutions
danieloberbilli
Specialist II
Specialist II

Hi Pooja,

When you have a = Prefix like '=sum(sales)' - this will calculate the result first (and once only) and ignores the dimensions in the chart object where you are going to use this variable in an expression.

If you dont use the = prefix then the dimension of the chart object is taken into account...that means - the calculation within the variable is done afterwards.

Please have look at this screenshot to clarify the difference:

Capture16.PNG.png

View solution in original post

2 Replies
danieloberbilli
Specialist II
Specialist II

Hi Pooja,

When you have a = Prefix like '=sum(sales)' - this will calculate the result first (and once only) and ignores the dimensions in the chart object where you are going to use this variable in an expression.

If you dont use the = prefix then the dimension of the chart object is taken into account...that means - the calculation within the variable is done afterwards.

Please have look at this screenshot to clarify the difference:

Capture16.PNG.png