Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
fredericvillemi
Creator III
Creator III

Action : Select in field on the five last values sorted

Hello,

I would like to have a button that select the first or last 3 values sorted in a specific order.

For example, I have a field "Level" which contains values like

'AB'

'CDE'

'FG'

'H'

'IJKL'

And I would like to have an action which automatically select the first 3 sorted in ascending order. (but as they may change, I can't put the names or a part of the name)

Is there a way ? with Concat or Aggr maybe ?

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be like attached sample

Search String:  ='('&Concat(DISTINCT {<Dim={"=Rank(Dim)>$(=Count(Distinct Dim)-3)"}>} Dim, '|')&')'

View solution in original post

4 Replies
tresesco
MVP
MVP

May be like attached sample

Search String:  ='('&Concat(DISTINCT {<Dim={"=Rank(Dim)>$(=Count(Distinct Dim)-3)"}>} Dim, '|')&')'

fredericvillemi
Creator III
Creator III
Author

Absolutely excellent

And if I want to have the last 3 ?

Thanks

tresesco
MVP
MVP

little simpler: ='('&Concat(DISTINCT {<Dim={"=Rank(Dim)<4"}>} Dim, '|')&')'

fredericvillemi
Creator III
Creator III
Author

Brilliant !

Thanks !