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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Top Customer sorting

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.

NameSales
Others2600
Cust12500
Cust21200
Cust31000
Cust4900
Cust5700
14 Replies
amit_saini
Master III
Master III

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)

MK_QSL
MVP
MVP

Like this?

MK_QSL
MVP
MVP

Manoj,

Check file in my second reply.

More dynamic way..

You need to hide the Rank column from presentation tab...

amit_saini
Master III
Master III

Hi Manish,

I suggested him three different ways for calculating Top customer.

Is anything wrong????

Thanks,

AS

MK_QSL
MVP
MVP

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.

amit_saini
Master III
Master III

Thanks for correcting me. I misunderstood the requirement.

Thanks,

AS

aveeeeeee7en
Specialist III
Specialist III

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

MK_QSL
MVP
MVP

My pleasure... !! Welcome to the QlikWorld

amit_saini
Master III
Master III

Yes Brother, I'm new here