Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
charlesdmeyer
Contributor
Contributor

Counting values greater than others

Everyone on here is always great about helping.

Here is my problem.  I have a series of students who have three grades (score 1, score 2, and score 3)

I want to know for how many students was score 1 their best score of the three, how many had score 2 as the best, and how many had score 3 as their best.

Of course, I will take the opposite way as well, how many times was score 1 their worst of the three, etc.

Thanks.

5 Replies
sunny_talwar

Is this something you need to do in the script?

charlesdmeyer
Contributor
Contributor
Author

If I can do it in a text box that would be great so I can show it on a report.

sunny_talwar

You can, but I wonder what the output is going to look like in a text box? If there are 300 students out of which 100 have score 1 as there highest, another 100 who have score 2 as highest and the last 100 who have score 3 as highest... what would you want to see in a text box object?

charlesdmeyer
Contributor
Contributor
Author

I would try and build three separate boxes just for ease. 

sunny_talwar

You can do this

Sum(If(RangeMax(Score1, Score2, Score3) = Score1, 1))

Sum(If(RangeMax(Score1, Score2, Score3) = Score2, 1))

Sum(If(RangeMax(Score1, Score2, Score3) = Score3, 1))