Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
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

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)

View solution in original post

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

View solution in original post

PrashantRupani
Creator
Creator
Author

Thanks Mayil.