KNOWLEDGE BASE

## Displaying Repeated Row Labels for Each Row in a View

Published: 01 Apr 2014

### Question

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

For example, view with grouped row headers:

### Environment

Tableau Desktop

Both options start from the "Original" worksheet in the workbook downloadable from the right-hand pane of this article. Directions for creating the "Original" worksheet are included in the workbook.

CLICK TO EXPAND STEPS
##### Option 1: Use INDEX()
1. Select Analysis > Create Calculated Field...
2. In the Calculated Field dialog box that opens, do the following, and then click OK:
1. Name the calculated field. In this example, the calculated field is named "Row Number"
2. In the formula field, create a calculation similar to the following:
`INDEX()`
3. Right-click [Row Number] in the data pane and select Convert to Discrete
4. Drag [Row Number] to the first position on the Rows shelf
5. Optional: right-click [Row Number] on the Rows shelf and uncheck Show Header
To view the above steps in action, see the video below.
Note: the video has no sound. To view the video in higher quality, click the YouTube icon below to watch it on YouTube directly.
CLICK TO EXPAND STEPS
##### Option 1: Combined fields
1. Drag the Category and Sub-Category dimensions to the Rows shelf.
2. Double-click Sales in the Measures pane.
3. Ctrl-click Category and Sub-Category in Dimensions, right-click the highlighted fields, and then select Create > Combined Field.
4. Drag the combined Category & Sub-Category field to the far left on Rows.
5. Right-click Category & Sub-Category on Rows, and then clear Show Header.
##### Option 2: Use Combined Calculation
1. Select Analysis > Create Calculated field...
2. In the Calculated Field dialog box that opens, do the following, and then click OK:
1. Name the calculated field. In this example, the calculated field is named "Combined"
2. In the formula field, create a calculation similar to the following:
`[Region]+[Category]+[Sub-Category]`
3. Drag [Combined] to the far left on the Rows shelf
4. Right-click [Combined] on Rows, and then uncheck 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 the above steps in action, see the video below.
Note: the video has no sound. To view the video in higher quality, click the YouTube icon below to watch it on YouTube directly.

Hierarchical headers provides additional information about the relationship of data to the end user. At a glance, the end user can see what values are grouped together. Less text on the screen also improves readability.

Repeated headers tend to be better when the data is exported so that there are no blank values in the export.

Notes:
• Using option 2 will disable the ad-hoc sort option for the first column; However sorting the combined field will allow rows to be individually sorted.
• Fields hidden in the view will still be included when exporting the data.
• 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.