Automatically Hide Values to Preserve Table Calculations

Published: 15 Jul 2014
Last Modified Date: 28 Aug 2017


How to dynamically hide values to preserve table calculations when filtering down to a single value in a view.


Tableau Desktop


The following example uses the Sample - Superstore data source.

Step 1 - Create the Calculated Fields 

  1. Navigate to Analysis > Create Calculated Field...
  2. Name the calculated field Paper and enter the following formula: IF [Sub-Category] = "Paper" THEN 1 ELSE 0 END
  3. Click OK
  4. Create a second calculated field named Only Paper with the following formula: IF WINDOW_SUM(SUM([Paper])) >=1 THEN "Show" ELSE "Hide" END
  5. Click OK

Step 2 - Filter the View 

  1. Drag Paper to Detail on the Marks card.
  2. Drag Only Paper to the Filters shelf, select Show, and click OK.
  3. Right-click Only Paper on the Filters shelf and navigate to Compute using > Pane (Down).
  4. Select Show and click OK.
Did this article resolve the issue?