Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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.

Tags (1)
5 Replies
Highlighted

Re: Counting values greater than others

Is this something you need to do in the script?

Highlighted
Contributor
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.

Highlighted

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?

Highlighted
Contributor
Contributor

Re: Counting values greater than others

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

Highlighted

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