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

rank items by their Sales value

Hello every one, 

  

I am trying to create a pivot table using the sample app of Qlik Cloud 'Supply Chain - Inventory & Product Availability'. 

My table has two dimensions: Brand and [Item Name], when a store is selected in the filter this table will show the Sales value of each item and the rank of the sales value of each item based on the sales value of the same item in the other stores 

For the rank column I use this formula: aggr({<[Long Store Name]=>}rank(total Sum([EPOS Sales])),[Long Store Name]) 

This formula gives me the right rank value, the problem that I am facing is that this formula works only when I select an item (see rank_1.png), otherwise it gives me a null value for all items (see rank_2.png). 

Can anyone help me to get the rank of sales value of an item in a store compared to the sales value of the same item in the other stores. 

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

May be try this

Aggr(
  Rank(Sum({<[Long Store Name]>} [EPOS Sales]))
, [Brand], [Item Name], [Long Store Name])

View solution in original post

2 Replies
sunny_talwar

May be try this

Aggr(
  Rank(Sum({<[Long Store Name]>} [EPOS Sales]))
, [Brand], [Item Name], [Long Store Name])
Hakim
Contributor
Author

Hi sunny_talwar,

Your solution works perfectly !

Thank you,

Hakim