Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

New Contributor

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:

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

Re: Using variable in an Expression vs. by itself

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.