Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear community,
I need help understanding how the DATA HANDLING - CALCULATION CONDITION of a chart works in Qlik Sense.
I have a table with a dimension calculated as follow:
=if((A) <= B,'OK','ATTENTION') as "A <= B"
and I need to write a condition that displays the table only when "A <= B" = 'ATTENTION' and if the condition is not satisfied want to display a message. This condition ("A <= B" = 'ATTENTION') is not working, can someone please help me with this? Thanks
I found the solution to my problem!!
The correct answer is: sum(if([A<=B]='ATTENTION',1,0) ) > 0
Thanks for the help
@g23 can you share a sample and the expected output ?
The calculation Condition is used to determine whether or not an object (e.g. chart) is to be displayed.
If you are trying to display only records with the value "ATTENTION", set analysis could help you.
Link to a post, where a similar question was solved:
Hope this helps,
Tomáš
Here an example of data and the dimension calculated.
Hope this helps, thanks
I tried applying this condition:
if([A<=B]='ATTENTION',1,0) but it's not working
@g23 How would you like to satisfy the condition? When user selects 'ATTENTION' from [A<=B]?
Instead of using calculation condition (which provides 2 options: display / not display all table values based on the result of the calculation), I would suggest to try defining the value of e.g. expression A in this way: if(A<=B,A,null()) .
Then if you turn off showing null values for this dimension (Uncheck Include null values), you will see only the values, that satisfy your condition.
The other option is to use set analysis in defining your dimensions / expressions.
I created a drop down input variable in which the user selects the dimension to display on table
I found the solution to my problem!!
The correct answer is: sum(if([A<=B]='ATTENTION',1,0) ) > 0
Thanks for the help