KNOWLEDGE BASE

Hiding Row Values in Crosstab


Published: 29 Apr 2015
Last Modified Date: 02 Sep 2016

Issue

How to hide values for selected rows in a crosstab view.

Environment

Tableau Desktop

Resolution

Replace measure with calculated field that sets the value to NULL for specified rows. This example uses Superstore sample data to exclude sales for the rows defined by Central Bookcases and Central Labels. More rows can be defined by adding additional OR statements.
  1. Select Analysis > Create Calculated Field.
  2. In the Calculated Field dialog box that opens, do the following, and then click OK:
  3. Name the calculated field. In this example, the calculated field is named Sales excluding rows.
  4. In the formula field, create a calculated field similar to the following:
     
    IF [Region] = "Central" AND [Category] = "Bookcases"
    OR [Region] = "Central" AND [Category] = "Labels"
    THEN NULL
    ELSE [Sales]
    END
  5.  Replace [Sales] with [Sales excluding rows] in the view

Additional Information

Note: setting a value to NULL will exclude the value from all table calculations, such as totals.
Did this article resolve the issue?