Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

TOP5 Customers based on sales

I want to display Top5 customers based on sales in straight table by using expression.

Only Top5 customers (Based on sales) should display, remaining customers should not display.

Please drop the solution here only as i can't open QVW file in my machine.

  

CustomerSales
Alles Lusekofter63.55
Art et Fashion140.4
Aujourd´hui343.44
Autokleider205.2
Belgium Black4048
Big Foot Shoes95.9
Bobby Socks163.36
Boleros3931.22
Bond Ltd21.36
Boombastic185.2
Casual Clothing332.64
Champes182
Chateau de Ville620.55
Cloe do Pau3189.06
Copacabana165.6
Da Bikini Expertu796.4
Da Santho2433.9
Das Alpen Shoe77.97
Davenport Fash617.4
1 Solution

Accepted Solutions
passionate
Specialist
Specialist

Suppress null.PNG

Also check suppress null option

View solution in original post

14 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Suppose you have this table:

Invoice with Customer and Amount Field

Every Database has an instruction to exctract the top n values (There are "Limit" or "TOP" Keawords for instance)

a query like this one:

select customer, sum(Amount) as somma from invoice group by customer order by somma desc limit 5

extract the first 50 then do an inner join of this one with the complete table of invoice (invoice is obviously for example)

pradosh_thakur
Master II
Master II

IF  want to do it in dashboard itself

1: use Rank function to filter out first 5 then filter

or

2: sort it by sales descending . use if(rowno()<=5,sum(sales)) in expression ans suppress null

or

3: dimesnsion  limits -> show top 5 values

regards

Pradosh

Learning never stops.
Mark_Little
Luminary
Luminary

Hi.

If you are using QlikView.

Create your Straight table, with the expressions SUM(Sales).

On the Dimension Limits,

set up as pictures below.

Mark

Anonymous
Not applicable
Author

Hi,

  If I use if(rowno()<=5,sum(sales)), the result is showing like below.

Top5 Customers.png

pradosh_thakur
Master II
Master II

not like this ..share the app if possible .

regards

Pradosh

Learning never stops.
Mark_Little
Luminary
Luminary

Here is a example attached.

Anonymous
Not applicable
Author

Please provide the correct expression and steps how to achieve TOP5 Customers.

pradosh_thakur
Master II
Master II

please find the attached

Capture.PNG

regards

Pradosh

Learning never stops.
pradosh_thakur
Master II
Master II

1: Method is already described by MARK

2: IN THE SORT tab use rank(sum(sales))> 0 in customer sorting

regards

Pradosh

Learning never stops.