Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

and's and or's together in set analysis

I am in need of help with a specific set analysis condition. I will just make up field names to get across what I am looking for:

(Field1= 'a') and (Field2 = 'b') and (Field3='c' or Field4='d' or Field5  = 'e')

Can anyone translate this into a set analysis condition for me? Thank you.

3 Replies
JonnyPoole
Former Employee
Former Employee

Here is an example of

Year = 2004 and Region = 'North America'  or Salesman ID=2002

sum(  {$<Year={2004},Region={'North America'}> + $<[Salesman ID]={2002}> } Sales)

setanalysis.PNG.png

Not applicable
Author

How would I incorporate multiple or's into one condition?

JonnyPoole
Former Employee
Former Employee

You could adding another '+' operator like this example.

Strictly speaking the '+' means UNION. So the 2 sets are unioned together to include both result sets together. So its a different logic mechanism then AND/OR strictly speaking but it should work.

sum(  {$<Year={2004},Region={'North America'}> + $<[Salesman ID]={2002}> + $<[Salesman ID]={2003}>  } Sales)

setanalysis2.PNG.png

Or you could also do if statements to do the same. When you don't specifiy a 3rd parameter in the If statement , the false conditions evaluate to null and are by default suppressed from the chart (presentation tab -> suppress missing)