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: 
JustTryingToLearn
Contributor III
Contributor III

How can I write a button expression that filters by the top 3 values?

I would like to take a button and write an expression that gives me the top 3 values in dimension. The parentheses and bar format is not working as I thought it would (I tried to write (max(var)|max(var,2)|max(var,3)). Does anyone have a good way to accomplish this? Thank you.

Labels (2)
2 Replies
fosuzuki
Partner - Specialist III
Partner - Specialist III

Hi,

In the Button object, add the Action = "Select values matching search criteria", and in the Value box, put something like this:

='($(=max(var))|$(=max(var,2))|$(=max(var,3)))'

JustTryingToLearn
Contributor III
Contributor III
Author

Thank you! This works perfect.