Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

charlesdmeyer
New 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.

Tags (1)
5 Replies
MVP
MVP

Re: Counting values greater than others

Is this something you need to do in the script?

charlesdmeyer
New Contributor

Re: Counting values greater than others

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

MVP
MVP

Re: Counting values greater than others

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
New Contributor

Re: Counting values greater than others

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

MVP
MVP

Re: Counting values greater than others

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))