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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
csanchezj
Contributor
Contributor

Dynamic Operand within an expression

Hi All,

I want to uses this expression if(sum(Sales) =$(vCondtion) $(vGoal), 1,0), to dynamically to use the variable condition (vCondtion) it currently return a NULL value.

The idea it's to set a variable with the content of a field (Operand), this field contain a arithmetic operand (<=,>=, =), and then do a comparison between Sales and Goal. Goal is a input variable.

I'm attaching a document.

If this possible to do or there is another way to do it.

Thanks in advance any help!

Labels (1)
2 Replies
steeramp
Partner - Creator II
Partner - Creator II

Hi Carlos,

try in this way  =if(sum(Sales) &' '&$(vCondtion)&' '&$(vGoal), 1,0)

Let me know

csanchezj
Contributor
Contributor
Author

Thanks Steeven,

For your rapid response but unfortunately the suggested modification did not work as expected. The Chart Performance column, should produce a 1 or 0 depending on the comparison between Goal and Operand associated to the product.