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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

if condition in the set analysis

hi All,

Here is my case:

i have a chart i am using the if condition but the problem is the chart calculation only take into consideration only the else expression:

Example:


case 1 :

if(condition,expression 1,expression 2) it take expression 2


case 2
:

if(condition,expression 2,expression 1) it take expression 1


can anyone help?

Thank you.

2 Replies
swuehl
MVP
MVP

Can your condition be unambiguously evaluated in the scope you are using it?

For example, if you test on field values, is the field value unique in this scope?

A common mistake is something like

=If( Customer = 'Stefan', Expression1, Expression2)

in a table chart, but without using Customer as dimension. So 'Customer' is not unique in the context it's evaluated (assuming you have more than 1 customer).

edit:

See also:

Use Aggregation Functions!

sunny_talwar

Difficult to comment before looking at it. Is it possible to share a sample?