Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with aggr max in straight table

Hello dear community,

I'm stuck on a silly problem.

I have the following table:

Capture.PNG

In a straight table I wish to display only the lines which confirm to the following rule:

Max of sequence for a given key.

I tried aggr(max(Sequence),Key), but it is for some weird reason picking out line 1 and 5.

Attached a sample app.

Thank you in advance for getting me unstuck!

Cheers

26 Replies
PrashantSangle

Hi,

check firstsortedvalue()

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

ok, trying to figure out usage.

sasiparupudi1
Master III
Master III

Remove sequence from your dimensions

hth

Sasi

Not applicable
Author

The expected result is to keep row 6, and 7

jonathandienst
Partner - Champion III
Partner - Champion III

If you use Aggr() in a table, then all the table dimension should be included in the Aggr()

aggr(max(Sequence),Key,Status,Sequence,product)

(but you need to remove Sequence from the table dimensions and the aggr)

PS the Aggr() is redundant - =Max(Sequence) is enough

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

But I think what you are perhaps after is to use the Aggr as a calculated dimension?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Tried it. It's picking out line 1, 5 and 6 ... ?

sasiparupudi1
Master III
Master III

Untitled2.jpg

Please remove sequence from dimension and it should give you your result

Not applicable
Author

Sorry i think i didnt express myself clearly.

Actually I dont need the expression field, i'm just using it to sort the table.

The expected result is as follows.

Capture.PNG

Thank you