Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
didierodayo
Partner - Creator III
Partner - Creator III

variable expression explained

Hello ,

I am reviewing a qlik document and can't work out what this expression is doing.

IF(ONLY({$<device= {'Frizer'}>} [Sale value $(vL.SaleValue)] / Pricevariable) >= Pricevariable

only ({$<device= {'Frizer'}>}[Sale value $(vL.SaleValue)]  / Pricevariable)

Question:

the expression work fine but what I don't understand is that there is no field in the called Sales value

there is a variable called $(vL.SaleValue)

why is the variable written is this format [Sale value $(vL.SaleValue)] inside the expression?

Thanks

1 Solution

Accepted Solutions
sunny_talwar

There might be multiple fields in your dashboard which might start with Sale value, right? Like for instance:

Sale vale XYZ

Sale vale ABC

Sale vale DEF

...

It seems that the variable vL.SaleValue is dynamically switching between XYZ, ABC, and DEF field....

View solution in original post

4 Replies
sunny_talwar

There might be multiple fields in your dashboard which might start with Sale value, right? Like for instance:

Sale vale XYZ

Sale vale ABC

Sale vale DEF

...

It seems that the variable vL.SaleValue is dynamically switching between XYZ, ABC, and DEF field....

didierodayo
Partner - Creator III
Partner - Creator III
Author

Yes Thanks Sunny, I just realised that is the case it is reading the value from those fields.

regards

didierodayo
Partner - Creator III
Partner - Creator III
Author

HI Sunny, is it possible to define the expression better ? because at the moment even though it seems to work I can see it says [Expression Error] .

what we have in the dashboard is actually buttons 1-  (Sale vale XYZ)  2- (Sale vale ABC) 3-(Sale vale DEF)

so when users click on the buttons it will sort by that.

could you suggest a different way of doing this because I have almost 15 expressions on different charts written in the same method.

Thanks

sunny_talwar

Expression Error can be ignored if the expression itself isn't giving you any trouble. I might only be able to give recommendations if I can see what exactly are you doing. Do you think you can share a sample ?