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: 
Mahamed_Qlik
Specialist
Specialist

Set analysis

Hi

How to write "OR" condition in set analysis expression for multiple values in single field.

Region   Total

UK            100

US             200

INDIA       400

AFRICA   500

 

I want to take sum of total for region "UK" or "US".

SUM({<Region={'UK'}+ Region={'US'}>}Total)   ---> its not working.

Labels (1)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

@Mahamed_Qlik This is the right set modifier expression on how you're trying to do it.

Sum({$<Region={'UK'}>+<Region={'US'}>} Total)

View solution in original post

3 Replies
vinieme12
Champion III
Champion III

 

OR can evaluated as below

 

in-case of multiple values in same field

Option1)      SUM({<Region={'UK','US'}>}Total)

in-case of values in different fields

Option2) Sum({<Region={‘UK’}>+<OTHRfld={‘SomeValue’}> Total )

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
sidhiq91
Specialist II
Specialist II

@Mahamed_Qlik  Please use the below code:

Sum({<Region={'UK','US'}>}Total)

If this resolves your issue, please like and accept it as a solution.

BrunPierre
Partner - Master
Partner - Master

@Mahamed_Qlik This is the right set modifier expression on how you're trying to do it.

Sum({$<Region={'UK'}>+<Region={'US'}>} Total)