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

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Top(Max value) discarding others

Hi,

I am attaching the sample app and go through it to find top(Max) values and discarding others in a pivot table

thanks in advance

12 Replies
ashishkalia
Partner - Creator
Partner - Creator

HI Jonh
Jst do one thing

TAB1:

LOAD GRADE&'-'StartDate AS Key,

          max(Num(EndDate)) AS TopDate

RESIDENT TABLE_X

GROUP BY GRADE, StartDate;

noconcate

LOAD Num#(SubField(Key,'-',0) )   AS     GRADE,

           TIMESTAMP(NUM#(SubField(Key,'-',-1))) as StartDate,

          TIMESTAMP(TopDate) as TopDate

RESIDENT TAB1;

u can DROP tab1 if u want or aliase so that doesnt make synthetic or else

ND NOW U CAN DIRECTLY TAKE THESE FIELDS INTO UR CHARTS.........

CHEERS.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Please find attached file for solution.

Regards,

jagan.

daveamz
Partner - Creator III
Partner - Creator III

Hi, John!

See the example attached. I used another table based on the resident one to mark the max values and then, in the pivot table, you can simply filter out unwanted values with set analysis.  If you don't need the other values at all, you can INNER JOIN instead of LEFT JOIN.

Best regards,

David