Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Selecting Top (Max) Duration For Every Status

Hello everyone!

Is there a way to tell Qlik Sense to select only max values of a measure for every dimension value? For example Assume I have a table that has ID, Desc, Duration, Type and Status (New, Accepted, Rejected, Under Processing); I'd like to get only the maximum duration for every status I have so maximum duration for the request that took the most of the time at New status, etc...

Your help is really appreciated!

12 Replies
Anonymous
Not applicable
Author

Thanks! but I am not counting, I am trying to get all information related with the maximum duration for every status I have. Putting Status only gives the right result; however, when I add Desc for example the gets everything.

swuehl
MVP
MVP

You need to understand the difference between dimensions and measures:

Dimensions and Measures

In your case, you want to group by status ('I want to see information per status, max duration, the Id of that max duration per status etc.')

If you want to see more information per status, don't touch your dimensions, add another expression, e.g. to see the desc for the id with the max duration per status:

FirstSortedValue(Desc, -aggr(max(Duration), ID, Desc))

Anonymous
Not applicable
Author

OK...

What about if I want to present this on a chart?

Also can I make use of the function Rank?

For example:

If(Aggr(Rank(Aggr(max(Duration), Status, ID), 3, 1), Status, ID) = 1, 

(Duration)

Thanks !