Ranking Sales by Categories

Ranking allows to assign an integer rank order to data tables or panes.

Using Tableau’s Global Superstore Orders table:

  1. Drag a Sales field from the Data pane to the Columns shelf.
  2. Drag a Category field from the Data pane to the Rows shelf.
  3. Drag a Sub-Category field from the Data pane to the Rows shelf.
  4. 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).
  5. 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.

Leave a Comment

Your email address will not be published. Required fields are marked *