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

Problem with Customer sales ranking

Hi, I have a table in my database with the columns: Product, Customer and Amount.

I need to show in a table the ranking of the Customer for a product. The problem is that in the table I have filtered the product and the customer and the rank is 1 every time I tried (or null).

Example:

Table in database:

ProductCustomerAmountRanking Proposed
PR1CUST110003
PR1CUST215002
PR1CUST35004
PR1CUST420001

In my table in qlikview I have to show:

ProductAmountRanking
PR115002

The Customer is filtered to CUST2 and this table contains only one row.

I've tried with aggr and rank but I always get Ranking 1.

Any idea?

Regards,

Oscar.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Try

Straight Table


Dimension

Product

Expression

SUM(Amount)

Aggr(Rank(SUM({1}Amount),4),Product,Customer)

or

Aggr(Rank(SUM({1}Amount),4),Customer)

View solution in original post

2 Replies
MK_QSL
MVP
MVP

Try

Straight Table


Dimension

Product

Expression

SUM(Amount)

Aggr(Rank(SUM({1}Amount),4),Product,Customer)

or

Aggr(Rank(SUM({1}Amount),4),Customer)

Not applicable
Author

Thank you very much, Manish. The first solution proposed works,