KNOWLEDGE BASE

Displaying Repeated Row Labels for Each Row in a Crosstab View


Published: 01 Apr 2014
Last Modified Date: 31 Aug 2018

Question

How to repeat row headers on each row of a crosstab view, instead of using grouped row headers.

For example, view with grouped row headers:
 
User-added image

View with repeating row headers:
 
User-added image

Environment

Tableau Desktop 

Answer

Option 1

  1. Open Tableau Desktop and connect to Superstore sample data.
  2. Drag the Category and Sub-Category dimensions to the Rows shelf.
  3. Double-click Sales in the Measures pane.
  4. Ctrl-click Category and Sub-Category in Dimensions, right-click the highlighted fields, and then select Create > Combined Field.
  5. Drag the combined Category & Sub-Category field to the far left on Rows.
  6. Right-click Category & Sub-Category on Rows, and then clear Show Header.

Option 2

  1. Open Tableau Desktop and connect to Superstore sample data.
  2. Drag the Category and Sub-Category dimensions to the Rows shelf.
  3. Double-click Sales in the Measures pane.
  4. Click Analysis > Create Calculated field... 
  5. Name the calculated field, enter the following formula and click OK
    [Categories]+[Sub-categories]
  6. Drag the new calculated field to the far left on Rows.
  7. Right-click Category & Sub-Category on Rows, and then clear Show Header.

Note: The combined field must produce a unique value for each row in order to repeat the header in every row.

To view these steps in action, see the video below:

Additional Information

  • Depending on your version of Tableau Desktop, the fields might be named Department and Category instead of Category and Sub-Category. 
  • Using this option will disable the sort option for the first column. 
  • To voice your support for the inclusion of this feature in a future product release, add your vote to the following Community Idea: Ability to choose to Repeat or Suppress cell value.
Did this article resolve the issue?