KNOWLEDGE BASE

Unable to Dynamically Show or Hide Parameter Controls, Filters, Web Objects, or Legends


Published: 05 Nov 2015
Last Modified Date: 14 Mar 2018

Issue

Unable to dynamically show/hide parameter controls, filters, web objects or legends. For example: 
  • If a dashboard swaps worksheets based on a parameter selection, then all parameter controls, filters, and legends associated with both worksheets will always show even when one of the worksheets is hidden.
  • Or, a worksheet does not show until a user triggers a Filter Action, then parameter controls, filters, and legends for that worksheet always show.

Environment

Tableau Desktop

Resolution

The attached example workbook uses the sample data set Superstore to demonstrate the following workarounds.

Option 1: Use a "spacer" worksheet to move filters under or out from "cover" worksheets or objects

This options requires that there be additional elements at the top and bottom of the dashboard in order for the filters to hide under.

Step 1 - Create a "spacer" worksheet

A "spacer" worksheet is a worksheet with a large square mark, that is also filtered by [View Filter].
  1. Create a calculated field with a name like "Blank" with a calculation similar to the following: ""
  2.  Drag [Blank] to the Rows shelf.
  3. Right-click [Blank] on the Rows shelf and uncheck Show Header.
  4. On the Marks card, in the dropdown menu select Square.
  5. Resize the square until it is as tall as the Segment filter.
  6. Drag [View Filter] to the Filters shelf.
  7. In the Filters dialog, do the following and click OK:
    1. Select Custom value list.
    2. Type in "Bar Chart".
    3. Hit the Plus (+) symbol on the yellow bar.

Step 2 - Build the dashboard

  1. On the dashboard, drag the "spacer" worksheet, the Segment filter, and the Category filter into the right-hand layout container.
  2.  Add the [Choose a view] parameter to the view as a floating element, and resize the parameter control to cover the "spacer worksheet".
  3.  Add another floating element to the worksheet to cover the Category filter.
    • In this example, a text object was formatted with a background color.

Option 2: Use a "spacer" worksheet to move filters off or onto the dashboard

This options allows the dynamic filters to be at the top of the dashboard, but still requires another element at the bottom of the dashboard for the filter to hide under.

Step 1 - Create a "spacer" worksheet

This worksheet will contain a large square mark and will also be filtered by [View Filter].
  1. Create a calculated field with a name like "Blank" with a calculation similar to the following: ""
  2. Drag [Blank] to the Rows shelf.
  3. Right-click [Blank] on the Rows shelf and uncheck Show Header.
  4. On the Marks card, in the dropdown menu select Square.
  5. Resize the square until it is as tall as the Segment filter.
  6. Drag [View Filter] to the Filters shelf.
  7. In the Filters dialog, do the following and click OK:
    1. Select Custom value list.
    2. Type in "Bar Chart".
    3. Hit the Plus (+) symbol on the yellow bar.

Step 2 - Build the dashboard

  1. On the dashboard, drag  the "spacer" worksheet, the Segment filter, and the Category filter into the same vertical layout container.
  2. Right-click click one of the filters and select Select Layout Container.
  3. Right-click white space in the selected layout container and check Floating.
  4. In the left-hand pane, select the Layout tab.
  5. With the layout container still selected change the y position so that the "spacer" worksheet is entirely off the top of the dashboard. In this example, the y position is -140.
  6. Add the [Choose a view] parameter to the view as a floating element, and resize the parameter control to cover the second filter.

Option 3: For filters only, set Filters to show Only Relevant Values and hide filter titles

This option does not work for dropdown filters and will leave white space where the hidden filter is.
  1. Right-click the [Category] Filter and uncheck Show Title.
  2. Right-click the [Category Filter] and select Only Relevant Values.
  3. Repeat steps 1-2 for the [Segment] filter.

Option 4: Replace filters or color legends with worksheets

 

Step 1 - Create a worksheet to replace the [Segment] Filter

  1. Drag [Segment] to the Rows shelf.
  2. Drag another copy of [Segment] to Color on the Marks card.
  3. Drag [View Filter] to the Filters shelf.
  4. In the Filters dialog, do the following and click OK:
    1. Select Custom value list.
    2. Type in "Bar Chart".
    3. Hit the plus symbol on the yellow bar.

Step 2 - Create a worksheet to replace the [Category] Filter

  1. Drag [Category] to the Rows shelf.
  2. Drag another copy of [Category] to Color on the Marks card.
  3. Drag [View Filter] to the Filters shelf.
  4. In the Filters dialog, do the following and click OK:
    1. Select Custom value list.
    2. Type in "Map".
    3. Hit the Plus (+) symbol on the yellow bar.

Step 3 - Build the dashboard

  1. On the dashboard, remove the [Segment] and [Category] filters.
  2. Drag the "Segment Filter" and "Category Filter" worksheets onto the dashboard.
  3. Navigate to Dashboard > Actions…
  4. In the Actions dialog, click Add Action > Filter…
  5. In the Edit Filter Action dialog, do the following and click OK:
    1. For Source Sheets, check only Segment Filter.
    2. For Run Action on, select Select.
    3. For Target Sheets, check only Bar Chart.
    4. For Clearing the selection will, select Show all values.
  6. Repeat steps 3-5 for the "Category Filter" worksheet.

Option 5: to hide Null specifically 

This example uses a color legend. 
  1. Navigate to the worksheet which contains the color legend.
  2. Right-click the measure on Color on the Marks card. Select Format…
  3. In the new Format pane that appears on the right-hand side, select the "Pane" tab instead of the "Axis" tab.
  4. Go to "Special Null Values" toward the bottom of the pane and type in the alternate text in the "Text" box.
Go to the dashboard and change the parameter to the selection where the color legend was changed to NULL and the color legend should now display the alternate text instead of "Null".
 

Additional Information

All four options will work whether the original worksheets are hidden using parameters or Filter Actions.

To voice your support for the inclusion of this feature in a future product release, add your vote to the following Community Idea: Hiding Quick Filters Dynamically upon sheet selection.
Did this article resolve the issue?