Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 |
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
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 :
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
Thank you for clarifying.