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

Find the Max value of a field and then its corresponding values using an expression

Hi everybody,

I have a table as follows:

IDNameOrder
5A4
5B2
5C1
5D5
5E3
4A2
4B4
4C1
4D3
3A1
3B4
3C3
3D2
2A5
2B4
2C3
2D2
2E1

For the maximum ID (that is 5) i want to display all the 'Name' with their respective 'Order' value. I want the end result to be as follows:

IDNameOrder
5A4
5B2
5C1
5D5
5E3

Thanks for your inputs!!!!   

4 Replies
tresesco
MVP
MVP

Straight table:

Dimension: ID

Exp1: FirstSortedValue(Name, -Order)

Exp2: Max(Order)

jyothish8807
Master II
Master II

Hi,

In Dimension; Use calculated Dimension

max(ID)

Exp1: Name

Exp2: Order

Hope it helps

Regards

KC

Best Regards,
KC
Not applicable
Author

Hi,

please find the attachment,

Dimensoin= use this

if(ID=max(ID),ID)

and use a second dimension too

if(ID=max(ID),Name)

and in expression

Order



with Regards

Harshita Gaur

anbu1984
Master III
Master III

Check this

Dimension: ID,Name

Expression: If(ID=Max(TOTAL ID), Order)