KNOWLEDGE BASE

Hide a Worksheet with a Filter Action


Published: 16 Sep 2017
Last Modified Date: 26 Aug 2019

Question

How to hide a worksheet with a Filter Action.

Environment

Tableau Desktop

Answer

CLICK TO EXPAND STEPS

Option 1 

The attached workbook (see upper right hand corner of this web page) uses the example data set Superstore to demonstrate the following directions.

Use the Exclude All Value option of the Filter action to collapse target sheets under their titles, hiding all data.
Step 1 - Build the views
  1. Drag [Region] to the Rows shelf and another instance of [Region] on Color.
  2. Create a new sheet, and drag [Sales] to the Columns shelf.
  3. Drag [Segment] to the Rows shelf.
Step 2 - Create the Dashboard
  1. Create a new Dashboard and drag the newly created sheets to it.
  2. Navigate to Dashboard > Actions…
  3. In the Actions dialog, click Add Action > Filter…
  4. In the Edit Filter Action dialog, do the following:
    1. For Source Sheets, check only Sheet 1.
    2. For Run Action on, choose Select.
    3. For Target Sheets, check only Sheet 2.
    4. For Clearing the selection will: select the option "Exclude Value"
  5. Click OK to close all dialogs.
 
CLICK TO EXPAND STEPS

Option 2

The field [Segment] will never be equal to "", which is the value of [Blank]. Therefore, whenever this Filter Action is run, all of the values in "Sheet 2" will be filtered out, and "Sheet 2" will disappear.

Step 1 - Build the views
  1. Drag [Region] to the Rows shelf and another instance of [Region] on Color.
  2. Select Analysis > Create Calculated Field
  3. Name the calculated field "Blank", enter the following formula and click OK:
    ""
  4. Drag [Blank] to Detail.
  5. Create a new sheet, and drag [Sales] to the Columns shelf.
  6. Drag [Segment] to the Rows shelf.
Step 2 - Create the Dashboard
  1. Create a new Dashboard and drag the newly created sheets to it.
  2. Navigate to Dashboard > Actions…
  3. In the Actions dialog, click Add Action > Filter…
  4. In the Edit Filter Action dialog, do the following:
    1. For Source Sheets, check only Sheet 1.
    2. For Run Action on, choose Select.
    3. For Target Sheets, check only Sheet 2.
    4. For Target Filters, select the Selected Fields radio button.
    5. Click Add Filter…
  5. In the Add Filter dialog, do the following:
    1. For the First Field dropdown, select Blank.
    2. For the Second Field dropdown, select Segment.
  6. Click OK three times to close all dialogs.

Additional Information

To view the above steps in action, see the video below.
Note: the video has no sound.
 

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