Forum Discussion
Anonymous
4 years agoNot applicable
dynamic ranking by sorting
Hello all, I have built a ranking by delivery quantity. As in the image. But now I want that the ranking is automatically adjusted according to my sorting. So if I sort it by the last 14 days the ra...
Whitewater100
Solution Sage
4 years agoHi:
Do you already have a measure for Delivery Quantity?
Are you ranking Countries or Products, etc? f so it's great if your model has unique dimension tables to connect to your fact table. Also the Date Table should be the source of your date slicer.
Something like
Total Delivered Units = SUM(Table[Total Shipments]) (this will be used in ranking measure.)
Rank = RANKX( ALL( Table[Cat_id_code] ), [Total Delivered Units],, DESC )
* see note below on Customer ranking by Sales.
If you have a data model with customer, product, etc dimension tables a good way to rank, say customers by sales is:
Rank = RANKX( ALL( Customer[Customer Names] ), [Total Sales],, DESC )