Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
DawidDaw
Contributor III
Contributor III

Nested Variables not working - sum of variables only evaluating first variable

Hello,

 

Im developing a QS app in QS Enterprise server. I have multiple variables that are frequently summed. When I use the syntax I am used to it only sums the first part.

Example:

Variables:

vVar1 = 3

vVar2 = 5

Result I am getting (last should obviously be 8):

EXPRESSION used=$(vVar1)=$(vVar2)=$(vVar1)+$(vVar2)
RESULT353

 

If I flip the variables around ($(vVar2)+$(vVar1)) I get 5 as a result.

I tried different syntaxes, all return an error or nothing.

What I tried:

  • adding or removing $ in variables or expression
  • adding or removing = in variables or expression
  • moving around the brackets

Everything return an error or a " - " cell, except the above method which only sums the first one.

 

Any idea's?

 

Thanks!

10 Replies
DawidDaw
Contributor III
Contributor III
Author

Hi sunny,

 

Sorry for not getting back to you, I've been of work. 

 

Our DB architects released a new version of the dataset. I cannot reproduce the issue with the new variables, the sums work fine.

I still have a non refreshed version of the original dataset, I'll investigate if I have some time. will post if I do. 

 

Thanks anyway for your help!