Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Dayna
Creator II
Creator II

Application performance using RANK

Hi All,

I have a rank calculation where I want to show the top 10 customers based on the sales quantity, my calculation is done as a dimension and looks like this to get the rank:

=aggr(NODISTINCT rank(sum(quantity)),customer)

From there, I then do an if statement on the customer name which looks like this:

=if((aggr(NODISTINCT rank(sum(quantity)),customer))

<= 10,

customer)

Due to the number of records in the system, this takes ages, and sometimes, does not run. What do you recommend? Have I approached this correctly?

Many thanks,

Dayna

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Create a Table (straight or pivot)


Dimension

Customer

Expression

SUM({<Customer = {"=Rank(SUM(quantity))<=10"}>}quantity)

View solution in original post

1 Reply
MK_QSL
MVP
MVP

Create a Table (straight or pivot)


Dimension

Customer

Expression

SUM({<Customer = {"=Rank(SUM(quantity))<=10"}>}quantity)