Hello – I would like to rank my top and bottom highest values for sales in Tableau. Can you help me?
I have used three (3) formulas from 2015 and included a parameter to choose how many items to return. This came from the 2015 post and it works great.
Create 3 fields:
- Rank Bottom – Net Pymt: RANK_UNIQUE(SUM([Net Payment]),’desc’)
- Rank Top – Net Pymt: RANK_UNIQUE(SUM([Net Payment]),’asc’)
- Rank Filter: [Rank Top – Net Pymt] <= [Top/bottom N :___]
[Rank Bottom – Net Pymt] <= [Top/bottom N :___]
- Create a Parameter: (provided image)
Data type: Integer
Current value: 5
Display format: Automatic
Allowable values: ‘All’