Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank of top 5 products

Hi can any body pls tell me how to find the rank top 5 sales products having different sales amount.

if sum(sales) in data is same for two products then these are grouped tp gether as one.remaing next sum(sales) we have to count.

regards

Mahesh  T

6 Replies
whiteline
Master II
Master II

Hi.

Depending on your requirements there are different solutions.

If you want just a table with top 5 products and their sales use dimension limits.

There is also rank() function. So you can use it in expressions or calculated dimensions for more complex cases.

Not applicable
Author

if two Products sales are same  the accordig to requirment it should be groped suppose both having 3rd ranl then thes values as 3rd rank 4th one another one has to select next product value having next highest

maxgro
MVP
MVP

different ways to find top performers:    community.qlik.com/docs/DOC-5187

interesting discussion on the rank() function Simple Rank() question

whiteline
Master II
Master II

As I have already said you can use rank() function.

=aggr(rank(Sum(amount)), Products)

It gives one row for two products if sales are same.

Not applicable
Author

Hi,

In a table:

Create a calculated dimension:

=Aggr(If(Rank(Sum([Sales]))<=5, Product, 'Others'),  Product)

Your expression will just be Sum(Sales)

In a list Box, create an expression:

= Aggr(If(Rank(Sum(Sales)) <= 5, Product), Product)

And you need to sort this express by Sum(Sales) if you to order the products (the above expression only selects, it does not sort)

Fabrice

iktrayanov
Creator III
Creator III

Take a look at this.