Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
PrashantRupani
Creator
Creator

OR condition in Set modifier

I have this set analysis expression : sum({1 <Year={1997},[Customer City] = {'London'}>} Sales)

I understand this will pull the sum of sales of year 19997 AND London. 

How to modify this expression if the condition is to show sum of sales for 1997 OR London?

Labels (1)
2 Solutions

Accepted Solutions
Nicole-Smith

You can use + between sets to create an OR condition:
sum({1 <Year={1997}>+<[Customer City] = {'London'}>} Sales)

View solution in original post

MayilVahanan

Hi @PrashantRupani 

Yes, its will give both. 

Its like "OR" Conditon.

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

4 Replies
Nicole-Smith

You can use + between sets to create an OR condition:
sum({1 <Year={1997}>+<[Customer City] = {'London'}>} Sales)

PrashantRupani
Creator
Creator
Author

Ok I see what you saying.

 + is an UNION Operator. So that will give results of 1997 or London depending on the data available in the database.  If there is data available for both, then it will give both. Correct? Can you confirm my understanding?

MayilVahanan

Hi @PrashantRupani 

Yes, its will give both. 

Its like "OR" Conditon.

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
PrashantRupani
Creator
Creator
Author

Thanks Mayil.