Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
avantime
Creator II
Creator II

Top x % with rank

Hi,

I have a request that sounds like this.. We need a table that shows:

-top 20% (out of the total number of rank A clients) rank A clients sorted by total sales.

-top 30% (out of the total number of rank B clients) rank B clients sorted by total sales.

-top 50% (out of the total number of rank C clients) rank C clients sorted by total sales.

Any thoughts on how I should approach this?

Thanks!

1 Solution

Accepted Solutions
Anonymous
Not applicable

Sounds pretty much like this:

Recipe for a Pareto Analysis

And this:

Recipe for an ABC Analysis

For rank you need to use Aggregate:

https://help.qlik.com/en-US/sense/3.0/Subsystems/Hub/Content/ChartFunctions/aggr.htm

I had to come up with the expression which calculates the rank recently and it's something like this:

aggr(rank(sum({<Customer.Name= >} sales)), Customer.Name)

Unfortunately I can't share the whole solution.

View solution in original post

7 Replies
sunny_talwar

Can you provide some sample data with the expected output?

avantime
Creator II
Creator II
Author

Sure, it should look something like:

ClientClient rankTurnover
Client2321321A99999
Client3123A99998
Client32432B999
Client342323B998
Client344335B997
Client2454B996
Client84332311B995
Client946743C99
Client32420C98
sunny_talwar

Hahaha, is this sample data or expected output?

avantime
Creator II
Creator II
Author

This is the expected output, as you asked.

I have 2 issues.

- how to get the top x% of clients with the same rank.

- how to show them in a table, one after another, sorted by rank and turnover.

Anonymous
Not applicable

Sounds pretty much like this:

Recipe for a Pareto Analysis

And this:

Recipe for an ABC Analysis

For rank you need to use Aggregate:

https://help.qlik.com/en-US/sense/3.0/Subsystems/Hub/Content/ChartFunctions/aggr.htm

I had to come up with the expression which calculates the rank recently and it's something like this:

aggr(rank(sum({<Customer.Name= >} sales)), Customer.Name)

Unfortunately I can't share the whole solution.

vikasmahajan

Hope this helps you

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
avantime
Creator II
Creator II
Author

Great answer, this really helped a lot, thank you very much.