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: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Can't use variables in expressions

Hi all,

I have defined some variables in the variable overview, I am trying to use them in an expression but it only seems to be calculating the first 2 and not the rest.

It's confusing me, Is anyone available to take a look please?

In the chart i have an expression called NM1. That expression is a calculation of 10 variables.

I have tried listing the 10 in the expression but llso i have tried creating a new variable with the 10 within it and calling the new variable in the expression, neither worked.

any help would be great.

Thanks

5 Replies
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Does anyone have any suggestions on this?

neelamsaroha157
Specialist II
Specialist II

Can you give an example...because I see that all the variables are individually being populated correctly.

What is the output you expect in NM1 column?

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Capture.PNGHi, thanks for your reply.

The individual variables are calculating as expected, but in the NM1 expression, i am trying to deduct some of the variables from the STD Margin variable but this doesnt seem to work.

I know i can use column() instead of each variable, but the user has the option to show/hide each of the expressions, and if one of them are hidden then this stops the column() working, so i have to use each variable.

I have uploaded another sample, this shows 2 extra expressions, one showing the calculation using the individual variables and the other shows the calculation using column().

the column expression is what i want but using the variables.

as you can see, the 2 columns that use the variables are not calculating

neelamsaroha157
Specialist II
Specialist II

I was able to find that it is the 'FX Impact' variable which is creating the issue. If you remove this variable, everything else works as expected. But I am not sure why is that.

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

ok, thanks for pointing out the problem variable, i will look into that variable further.


Thanks for your help