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

Variable Expressions within variable expressions

Hi, i am using multiple variable expressions to create a report. This involves variable expressions referencing other variable expressions.

Are there any limits to the amount of times this can be done?

The reason i ask is that i have tried to replace a field with a variable expression and this has meant my final expression is now returning zero - if i revert back to the field the expression works.

4 Replies
Not applicable
Author

There may be a limit at some point, but a variable inside a variable should work. I have a variable that is like:

=If(FIELD='VALUE', var1, var2)
And that works just fine. Are you sure your variable is returning the correct values. You may be able to see what it returns using a Text Object or a chart expression without a label.

Anonymous
Not applicable
Author

i have several variables within variables that are working fine.

I have one final variable that adds two previous ones together - this starts to return zero if i add more variable expressions into some of the previous variables i have.

All the other variablesi have are still returning the correct values

Not applicable
Author

Hi,

Depending on the expressions in your variables, you may have a quoting issue. In other words, a mixture of double or single quotes that are conflicting with each other. Worth a look.

I hope this helps. Let me know if you need any clarification.

Thanks

Nick

Anonymous
Not applicable
Author

Hi, I have some if statements that use single quotes - however the expressions i am modifying do not use any quotations.