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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filtering in Diagrams with variables

Hello QV-Community,



I would like to use a if expression to write a value from a variable. The variable is already defined in the variable window and has the current value of 0.
Now, when I write my formula expression with a 0, it works perfect.

Like this:

=if

    (

     ( min(date#(HEL_DATA_Datum,'DD.MM.YYYY')) - min (SAL_OPPORTUNITYLINEITEM_von_Datum__c)) = 0 ,

     ( min(date#(HEL_DATA_Datum,'DD.MM.YYYY')) - min (SAL_OPPORTUNITYLINEITEM_von_Datum__c)),

     'x'

    )

However when I try to replace the 0 by a variable (varLimit) it doesnt work !!

Like this:

=if

    (

     ( min(date#(HEL_DATA_Datum,'DD.MM.YYYY')) - min (SAL_OPPORTUNITYLINEITEM_von_Datum__c)) = $(varLimit) ,

     ( min(date#(HEL_DATA_Datum,'DD.MM.YYYY')) - min (SAL_OPPORTUNITYLINEITEM_von_Datum__c)),

     'x'

    )

What am I doing wrong here ? Please give me a tip. Thank you.

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

I still do not understand why the QV expression = varLimit dont works when the variable takes the value 0

Unfortunately I had to create workarounds one by one I take the 0 expression of a range with varLimitMin = 0 and have done with varLimitMax = 0.

Example: if( ....(x <= varLimitMin) AND (x >= varLimitMax),......

At least it works ...


View solution in original post

3 Replies
lironbaram
Partner - Master III
Partner - Master III

just a thought change the variable to varLimit with out the $ sign

Not applicable
Author

Hallo,

i tried it without the $ sign.

But doesnt work with ... = (varLimit) ...

If i use the expression ... <= (varLimit)... or ...>= (varLimit)... it works perfectly !

I need to match with  ... = (varLimit)..

Can anybody help me ?. thank you !


Not applicable
Author

Hi,

I still do not understand why the QV expression = varLimit dont works when the variable takes the value 0

Unfortunately I had to create workarounds one by one I take the 0 expression of a range with varLimitMin = 0 and have done with varLimitMax = 0.

Example: if( ....(x <= varLimitMin) AND (x >= varLimitMax),......

At least it works ...