Announcements
cancel
Showing results for
Did you mean:
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.

 Name Sport Score Adam Tennis 80 Joseph Soccer 70 David Hockey 80 John Badminton 50 Peter Golf 60 Thomas Tennis 90 Gabriel Soccer 90 Gabriel Tennis 85 Manuel Soccer 90 Manuel Tennis 82 Thomas Tennis 75

1 Solution

Accepted Solutions

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

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") 😉
4 Replies

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 :

Regards,
Taoufiq ZARRA

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

(you can mark up to 3 "solutions") 😉
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)

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

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") 😉
Contributor III
Author

Thank you for clarifying.