Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I need help in getting top customers from below table, where I would like to see Others in the bottom. Because Others consists of many small customers. Please any body provide me the better solution.
Name | Sales |
Others | 2600 |
Cust1 | 2500 |
Cust2 | 1200 |
Cust3 | 1000 |
Cust4 | 900 |
Cust5 | 700 |
Hi Manoj,
Hope this will help you:
rank(sum(Sales),1,1)
or
=aggr(if(Rank(sum(Sales))<=3,Sales),Sales) (For calculating Top 3)
or
=if(rank(sum(Sales),1,1)=1,'# 1')(For showing '#1' against top sales figure)
Like this?
Manoj,
Check file in my second reply.
More dynamic way..
You need to hide the Rank column from presentation tab...
Hi Manish,
I suggested him three different ways for calculating Top customer.
Is anything wrong????
Thanks,
AS
I think you don't understand question.
He wants whenever he sort the sales from top to bottom (Descending Order) the SUM(Sales) for Others should go to the bottom.
Hope now it's clear to you.
Thanks for correcting me. I misunderstood the requirement.
Thanks,
AS
Hi Manoj
Use Rank Function to do Customer wise Sorting
Use this Expression in your Script:
=if(aggr(rank(sum(Sales)),Sales)<=10,Sales)
Regards
Aviral Nag
My pleasure... !! Welcome to the QlikWorld
Yes Brother, I'm new here