Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max Function

Hello Friends

Using the below value I am trying to create a pivot table top in each subject and score.

I tried the max function =Max(Score) in the expression and Class in the dimension its fine but when I add Name in the dimension the chart showing the wrong result.

Could you please advise me, how to implement this in a pivot table.

LOAD * Inline [

Class, Name, Score

English, James,5

English, Sneha,6

English, Ram,10

Maths,Troy,1

Maths,Khan,5

Maths,Alif,8

Maths,James,9

Science,Sneha,5

Science,Ram,7

History,Ram,9

History,Khan,3

History,Troy,1

History,James,2

];

Regards

Joe

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Dimension: Class

Exp1: FirstSortedValue(Name, -Score)

Exp2: Max(Score)


View solution in original post

6 Replies
anbu1984
Master III
Master III

=Aggr(Max(Score) ,Class)

Not applicable
Author

in the expression write : AGGR(Max(Score),Class)

dimension : Name

tresesco
MVP
MVP

Dimension: Class

Exp1: FirstSortedValue(Name, -Score)

Exp2: Max(Score)


martinpohl
Partner - Master
Partner - Master

use

max(total <Class> Score)

Regards

Not applicable
Author

Hi Anbu,

Thanks for u r reply but the result is wrong for instance Ram is the topper in English but as per your result James.

Regards

Joe

Not applicable
Author

Hello All,

thanks a lot for your suggestions,

tresesco, your answer is worked,

Thanks again