Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ManuelLindekeit
Contributor III
Contributor III

Set Analysis - modifier question

Hi, 

I'm looking for suggestions on a set analysis. Posting simple data here for my example. 

I need to write a set analysis that shows the names of students who play 2 sports and have both grades over 80. 

It would return Manuel and Gabriel. 

NameSportScore
AdamTennis80
JosephSoccer70
DavidHockey80
JohnBadminton50
PeterGolf60
ThomasTennis90
GabrielSoccer90
GabrielTennis85
Manuel Soccer90
Manuel Tennis82
ThomasTennis75

 

1 Solution

Accepted Solutions
Taoufiq_Zarra
Master II
Master II

@ManuelLindekeit 

you need an intersection between two requirements : score and count

with the formula you proposed you may have rows that satisfies one condition or the other since it is being compared with the same field ->Name. If it's on two different fields, it'll work.

below an example with both approaches

Capture.JPG

 

Adam and David are displayed since  min(Score) of Adam and David >=80

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

4 Replies
Taoufiq_Zarra
Master II
Master II

Maye be :

for example if you want sum( of Score ) for students who play 2 sports and have both grades over 80 :

in expression

=sum({<Name={"=count(Sport)=2"}*{"= min(Score)>=80"}>} Score)

 

output :

Taoufiq_ZARRA_0-1590529108269.png

 

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
ManuelLindekeit
Contributor III
Contributor III
Author

Hi and thanks for the solution. 

But can you please help me understand why yours work and it doesn't work as follows: =only({<Scores.Name={"=count(Scores.Sport)=2"}, Scores.Name={"= min(Scores.Score)>=75"}>} Scores.Name)

 

Taoufiq_Zarra
Master II
Master II

@ManuelLindekeit 

you need an intersection between two requirements : score and count

with the formula you proposed you may have rows that satisfies one condition or the other since it is being compared with the same field ->Name. If it's on two different fields, it'll work.

below an example with both approaches

Capture.JPG

 

Adam and David are displayed since  min(Score) of Adam and David >=80

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

ManuelLindekeit
Contributor III
Contributor III
Author

Thank you for clarifying.