Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor

Lose variable expression after reload on Qlik Sense

Suppose that I have a field x and I defined a variable vX to be an expression: =max(x). Also suppose that the maximum value of x is 10.

After a reload, Qlik Sense converts this expression on the variable to the value 10. This data is being reloaded every week and maybe the maximum could be 11 on another week. So if Qlik Sense makes this conversion, I can display wrong information and I don't want to change manually the expression every time to be the expression again.

Is there any way to keep the variable as an expression?

1 Reply

Re: Lose variable expression after reload on Qlik Sense

The variable, although it turns into a value, will recalculate every time you reload, so this may be fine for your purposes.

Alternatively, you can put quotations around your expression to have it passed in as an expression, rather than a value.

E.g. Expression = 'max(x)'

This page provides an explanation of this concept https://help.qlik.com/en-US/sense/1.1/Subsystems/Hub/Content/Scripting/ScriptVariables.htm

Community Browser