Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
lzzoe
Contributor II
Contributor II

Select rows with largest value by one dimension

Hi All,

I am quite new to Qlik. I want to select rows with largest NUM in each ID_NO. I want to do this in chart preparation stage instead of data loading stage. I try to use "= Max(TOTAL <ID_NO> NUM)" but it does not work. Thank you

Current:

ID_NO OTHER NUM
112233 AB 5
112233 AB 7
112234 AB 1
112235 CF 8
112235 RG 10
112235 DG 7
112236 RY 6
112236 WA 8

 

To-be:

ID_NO OTHER NUM
112233 AB 7
112234 AB 1
112235 RG 10
112236 WA 8
Labels (3)
3 Replies
Nagaraju_KCS
Specialist III
Specialist III

Try this 
AGGR(MAX(NUM),ID_NO)

Nagaraju_KCS_0-1766127462606.png

 

lzzoe
Contributor II
Contributor II
Author

Hi Nagaraju,

may I ask where I should type this expression in?

Vegar
MVP
MVP

@lzzoe 

The suggestion by @Nagaraju_KCS  is to replace your existing measure ( "= Max(TOTAL <ID_NO> NUM)" ) with the new suggested measure ("=AGGR(MAX(NUM),ID_NO)")