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: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Set Analysis OR Condition

Morning Friends,

How to write multi conditional OR statement in Set Analysis ?

I would need a condition to identify students who secured 90% in either Maths or Physics.

Below is the sample data

 

SIDSnamePhysicsMathsChem
1ABC959090
2XYZ856578
3PQR609058
4EFG985055
1 Solution

Accepted Solutions
arulsettu
Master III
Master III

like this

Count({<Maths={'>=90'}>+<Physics={'>=90'}>}Sname)

View solution in original post

8 Replies
arulsettu
Master III
Master III

may be this

Count({<Maths={'>=90'}>}Sname)+Count({<Chem={'>=90'}>}Sname)

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

I am using the same expression. Is there a way to put both conditions in same set expression ?

arulsettu
Master III
Master III

like this

Count({<Maths={'>=90'}>+<Physics={'>=90'}>}Sname)

MayilVahanan

Hi

Try like this

Count({<Maths={'>=90'}>+<Physics={'>=90'}>}Sname)

SID Sname Maths Physics Count({<Maths={'>=90'}>+<Physics={'>=90'}>}Sname)
3
1ABC90951
3PQR90601
4EFG50981
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

OR statement in Set Analysis is represented as "+" sign.

=Count({<Maths={'>=90'}>+<Chem={'>=90'}>}Sname)

The syntax Count({<Condition1> + <Condition2>} FieldName).

sravanthialuval
Creator
Creator

Try like this,

Capture.PNG

The no of students who secured 90% in either Maths or Physics.

Capture1.PNG

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Thanks Arul,

I am using the same expression in original application it is not working, but it works with sample set of data. Need to check weird behavior of expression.

arulsettu
Master III
Master III

check the expression