KNOWLEDGE BASE

Hide a Worksheet with a Filter Action


Published: 16 Sep 2017
Last Modified Date: 05 Dec 2017

Question

How to hide a worksheet with a Filter Action.

Environment

  • Tableau Desktop

Answer

The attached workbook uses the example data set Superstore to demonstrate the following directions:

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.

  1. Create a new worksheet, named "Sheet 1".

  2. On "Sheet 1", drag [Region] to the Rows shelf.

  3. On "Sheet 1", drag [Region] to Color on the marks card.

  4. Select Analysis > Create Calculated Field

  5. 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 "Blank".

    • In the Formula field, create a calculation similar to the following:

    • ""

  6. On "Sheet 1", drag [Blank] to Detail.

  7. Create a new worksheet, named "Sheet 2".

  8. On "Sheet 2", drag [Sales] to the Columns shelf.

  9. On "Sheet 2", drag [Segment] to the Rows shelf.

  10. Create a new dashboard.

  11. Drag "Sheet 1" and "Sheet 2" onto the new dashboard.

  12. Navigate to Dashboard > Actions…

  13. In the Actions dialog, click Add Action > Filter…

  14. In the Edit Filter Action dialog, do the following:

    • For Source Sheets, check only Sheet 1.

    • For Run Action on, choose Select.

    • For Target Sheets, check only Sheet 2.

    • For Target Filters, select the Selected Fields radio button.

    • Click Add Filter…

  15. In the Add Filter dialog, do the following:

    • For the First Field dropdown, select Blank.

    • For the Second Field dropdown, select Segment.

  16. 16. Click OK three times to close all dialogs.

Did this article resolve the issue?