Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Group Sum Rank calculation

Hi guys quick one:

 

I want to determine the product rank against the sum of quantity relevant to that product.

 

For example, I have ~30 products, and the table contains 100k + rows of data on the quantities for those product (where one line represent a product and the quantity). If the sum of product 4 = 100, I want to return what its rank is amongst the sum of the other product quantities (a group sum rank I suppose you could call it). Each row for product 4 (or x), the rank should be same, as its calculated overall, and then 1-30 for the other products....

 

Im currently using this and its not working: 

product index = RANKX( ALL('Items'),[quantity],,ASC,Dense)

3 Replies