Skip to main content
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Ranking function across two dimension for a count of products

Dear reader,


I am currently working on a ranking function which ranks products bought by the frequency. The location of the shelf is also included, however it is currently only ranking within shelves and not across the entire shop. For example if we have a shelf A with 3 products: Apple: 3, Banana 5: Tomato: 1 and a shelf B: Cucumber: 4, Pineapple: 2, Rice: 6.

I want the ranking to look like this:

B: Rice             |1

A: Banana      |2

B: Cucumber|3

A: Apple          |4

B: Pineapple|5

A: Tomato     |6


However, it is currently showing up as follows:

A: Banana      |1

A: Apple          |2

A: Tomato      |3

B: Rice             |1

B: Cucumber|2

B: Pineapple|3



Image for reference of my data. 

I am currently using this function for ranking: 

rank(count(Total Aantal))


Any help is appreciated!

Labels (1)
1 Reply

Hi, try with the TOTAL on the rank function, not the count: rank(Total  count(Aantal))