Qlik Community

Qlik Healthcare User Group

Highlighted
csanchezj
New 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!

Tags (1)
2 Replies
steeramp
New Contributor III

Re: Dynamic Operand within an expression

Hi Carlos,

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

Let me know

csanchezj
New Contributor

Re: Dynamic Operand within an expression

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.