Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Top 5 & Bottom 5 Values

Hi Experts,

I want top 5 and bottom 5 customers. How to write the expression

Please help me

Thanks in Advance

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Please find attached if fits your needs

Capturar.PNG

View solution in original post

8 Replies
Clever_Anjos
Employee
Employee

There´s a function called FirstSortedValue that can do what you need

Bottom customers:

FirstSortedValue(Customer, Aggr(Sum(Sales),Customer),1)

FirstSortedValue(Customer, Aggr(Sum(Sales),Customer),2)

...

FirstSortedValue(Customer, Aggr(Sum(Sales),Customer),5)


Topcustomers:

FirstSortedValue(Customer, -Aggr(Sum(Sales),Customer),1)

FirstSortedValue(Customer, -Aggr(Sum(Sales),Customer),2)

...

FirstSortedValue(Customer, -Aggr(Sum(Sales),Customer),5)

qlikviewwizard
Master II
Master II

Hi Abhi,

Please check my Firstsortedvalue Vs FirstValue Example

Not applicable
Author

Hi Clever,

Its not working. I want to display top and bottom 5 customers in Bar chart.

Thanks in Advance

Not applicable
Author

depending on what you are trying to accomplish, you may be able to use your standard expression and use Dimension limits tab

Clever_Anjos
Employee
Employee

Sorry, if you need it inside a graphe please use Dimension Limits as akrepistman‌ told

Clever_Anjos
Employee
Employee

It would be easier if you post a sample of your application

Clever_Anjos
Employee
Employee

Please find attached if fits your needs

Capturar.PNG

Anonymous
Not applicable
Author

Hi,

Try this