Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to get top 10% popular items

Hi there,

I am working on a dashbaords with the requirement to get the top 10% popular items. I am using the expressions as follows:

=aggr (if (rank(sum(item_qty))<=0.1*count(item_code),item_code),item_code)

but it doesn't work. I think the mistake may occurs in 0.1*count(item_code), but I haven't figure out how to fix it.

Thank you so much for your help!

Best Regards,

Gloria

1 Reply
jpapador
Partner - Specialist
Partner - Specialist

Try:

If(Aggr(Rank(Sum(item_qty)), item_code) <= (Max(Aggr(Rank(Sum(item_qty)), item_code)))*.1, item_code)

You could make this a calculated dimension.  I would also make Max(Aggr(Rank(Sum(item_qty)), item_code)) a variable so you expression could look like:

If(Aggr(Rank(Sum(item_qty)), item_code) <= vMaxRank*.1, item_code)