KNOWLEDGE BASE

Hide Only One Instance of Sub-Category column


Published: 17 Apr 2015
Last Modified Date: 11 Oct 2019

Issue

Unable to hide only one instance of a nested sub-category column or row.

For example, If Segment and Region are on the Columns shelf, then hiding Consumer East will hide East for all segments.

Environment

Tableau Desktop

Resolution

Option 1: Hide one value of a combined field
This option will only work if the sub-category columns are created by a dimension and not [Measure Names]. These directions begin from the worksheet "Opt 1: Original."
  1. Navigate to Analysis > Reveal Hidden Data..
  2. Create a combined field of the fields on the Columns shelf. For directions on creating a combined field, see the Combine Fields section of Organize and Customize Fields in the Data Pane.
  3. Add the combined field to the Columns shelf in the second to last position.
  4. Each column will have two headers. For the column that should be hidden, right-click the header created by the combined field, which will be the header above the bar, and select Hide.
  5. Navigate to Format > Borders…
  6. In the left-hand Format Borders pane, under Column Divider, move the slider for Level one to the left.
Option 2: Use a table calculation filter
This option will only work if the sub-category columns are created by a dimension and not [Measure Names]. These directions begin from the worksheet "Opt 2: Original."
  1. Navigate to Analysis > Reveal Hidden Data.
  2. Select Analysis > Create Calculated Field.
  3. In the Calculated Field dialog box that opens, do the following, and then click OK:
    • Name the calculated field. In this example, the calculated field is named "Hide Consumer East"
    • In the formula field, create a calculation similar to the following:
      NOT (
      LOOKUP(MIN([Segment]), 0) = "Consumer"
      AND
      LOOKUP(MIN([Region]), 0) = "East"
      )
  4. Drag Hide Consumer East to the Filters shelf.
  5. In the Filter dialog, check True. 
  6. Click OK.
Option 3: Pivot Measures
Directions begin from the worksheet "Opt 3: Original."
  1. Pivot all of the measures used to create the view. For some data sources, the measures can be pivoted directly in Tableau Desktop. For detailed directions, please see Pivot Data from Columns to Rows.
  2. Follow the directions in "Option 1: Hide one value of a combined field" above using Segment and Pivot Field Names as the two dimensions.

Option 4: Make separate worksheets for each measure and combine on one dashboard
Directions begin from the worksheet "Opt 4: Original."
  1. Navigate to Analysis > Reveal Hidden Data.
  2. Duplicate "Opt 3: Original" and rename the copy "Opt 3: Final - Consumer."
  3. Right-click Consumer in the view and select Keep Only.
  4. Right-click Profit in the view and select Hide.
  5. Duplicate "Opt 3: Original" and rename the copy "Opt 3: Final - All other segments."
  6. Right-click Consumer in the view and select Exclude.
  7. Create a dashboard and add both "Opt 3: Final - Consumer" and "Opt 3: Final - All other segments" to the dashboard.
  8. Right click the title Opt 3: Final - All other segments and select Edit Title…
  9. In the Edit Title dialog, replace the title with a blank space. (This will help keep the vertical spacing the same.)
  10. With one of the worksheets on the dashboard selected, click the Layout tab in the left-hand pane.
  11. Open the Outer Padding dropdown and do the following:
    • Uncheck All sides equal
    • Set the edge touching the other worksheet have a padding of 0.

Additional Information

To voice your support for the inclusion of this enhancement in a future product release, add your vote to the following Community Idea: Group Measure Names


Discuss this article... Feedback Forum
Did this article resolve the issue?