Ranking allows to assign an integer rank order to data tables or panes.
Using Tableau’s Global Superstore Orders table:
- Drag a Sales field from the Data pane to the Columns shelf.
- Drag a Category field from the Data pane to the Rows shelf.
- Drag a Sub-Category field from the Data pane to the Rows shelf.
- Drag a new Sales field from the Data pane to Label on the Marks card.
- Right-click this Sales field, Quick Table Calculation, and select Rank.
- Right-click this Sales field and select Discrete (so that it can be placed within fields)
- Drag this Sales field to the Rows shelf, between Category and Sub-Category
- Right-click this Sales field, now on the Rows shelf, select Compute Using, and select Pane (down).
- Drag a new Sales field from the Data pane to Label on the Marks card so that sales amounts appear next to each mark on the view.
Compute Using. It allows to rank the items by pane, in this case – so that you can rank sales by each category (pane).
Result: Rank Sales by Categories. Notice how each category has its own rank.