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: 
Anonymous
Not applicable

Using variable in an Expression vs. by itself

variable1 Definition:
Fractile({<NumberField=>} if(TimeField < vVariable2, TimeField), vVariable3)

If it's used by itself as an expression, as one of the columns of a Straight Chart like:
=$(vVariable1)

It displays values correctly. Each row has a distinct value.

But, when this variable is used inside an expression in the same chart; the expression doesn't work, for example, the expression:

=Avg({<NumberField=, TimeField={'<$(=vVariable1)'}>} TimeField)

1 Reply
sunny_talwar

When you use this this as set analysis the variable is evaluated once per chart. What that means is that if you use this variable in a text box object, whatever value you get will be used across the chart. Set analysis doesn't get evaluated on each dimension. The work around this is to use Aggr() function.