Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selection based on formula

Hi,

I want to make a button to select the top10 products,

the top10 products are defined with the next condition:

RANK(Sum(num_purchases))<=10,

How can I do it???

Thanks,

David

2 Replies
Not applicable
Author

Hi David,

try to use this code within the search expression of your button (take care of the single quotes):

='=(if(rank(Sum(num_purchases), Product) <= 10, Product))'

HtH

Roland

Not applicable
Author

Example:

Two buttons, first calculate complete table, second calculate Top 10.

You need to create 1 variable who change his value when press the button

Button 1:

vTop10 = Product

Button 2:

vTop10 = If(Rank(Sum(num_purchases), Product) <= 10, Product)

In your graphic, need to put a calculated dimension like this

= $(vTop10)

Try this, i used sometimes and work.

Regards.-