KNOWLEDGE BASE

Clearing All Actions in a Dashboard with One Click


Published: 03 Oct 2016
Last Modified Date: 13 Oct 2016

Question

How to clear all actions on a dashboard with one click.

Environment

Tableau Desktop

Answer

This example uses the Sample – Superstore data source. 

To view the below steps in action, see the video here: 

 

Step 1 - Build the views

Build the view for profit by state
  1. Rename Sheet 1 to Map.
  2. Drag State to the canvas.
  3. Drag Profit to Color.
Build the view for profit by category
  1. Select Worksheet > New Worksheet, and  rename the sheet to Bars.
  2. Drag Category to Columns.
  3. Drag Sub-Category to the right of Category on Columns.
  4. Drag Profit to Rows.
  5. Drag Profit to Color.

Step 3 – Create filter sheets

Create an All label
  1. Select Analysis Create Calculated Field.
  2. Name the field Label – All.
  3. Enter the following calculation, then click OK:
    “All”
Create a Clear All label
  1. Select AnalysisCreate Calculated Field.
  2. Name the field Label – Clear All.
  3. Enter the following calculation, then click OK:
    “Clear All Filters”
Create sheets
  1. Select Worksheet > New Worksheet, then rename the sheet to Clear Region.
  2. Drag Region to Columns.
  3. Drag Label – All to Rows.
  4. Drag Region to Text.
  5. Hide labels and headers:
    • Right-click the Region label, and select Hide Field Labels for Columns.
    • Right-click the Label - All label, and select Hide Field Labels for Rows.
    • Right-click one of the region names on the top row, and uncheck Show Header.
  6. Repeat the above steps 1 -5 in this procedure, using Category instead of Region.
Create a sheet that you can use to clear all filters
  1. Select Worksheet > New Worksheet, and rename the worksheet to Clear All.
  2. Drag Label - Clear All to Columns.
  3. Drag Category to the right of Label - Clear All on Columns.
  4. Drag Region to Text.
  5. Hide labels and headers:
    • Right-click Label – Clear All / Category, and click Hide Field Labels for Columns.
    • Right-click Furniture, and uncheck Show Header.
    • Resize the cell under Clear All Filters so that only the header, Clear All Filters, shows.
 

Step 4 - Create a dashboard

  1. Select Dashboard > New Dashboard.
  2. From the Dashboard pane, drag Map to the view area, and then drag Bars to the right of Map and the left of Profit.
  3. Drag Clear Region to the top of Map.
  4. Right-click the title Clear Region, and then select Hide Title.
  5. Drag Clear Category under Clear Region.
  6. Right-click the title Clear Category, and then select Hide Title.
  7. Drag Clear All to the right of the Bars sheet, and under Profit.
  8. Right-click the title Clear All, and then select Hide Title.
  9. Adjust sheet sizes as desired.

Step 5 – Create Filter Actions

Create filters for Region and Category
  1. Select Dashboard > Actions > Add Action > Filter… and make the following selections:
    • Name: Clear Region
    • Source Sheets: Ensure that only Clear Region is checked
    • Run Action On: Select
    • Target Sheets: Ensure that only Bars, Map and Clear Region are selected
    • Clearing the selection will: Show all values
    • Target filters: Selected Fields
  2. Select Add Filter and enter Region for both Source and Target, then click OK.
  3. Click OK.
  4. Repeat the above steps, but replace Region and Clear Region with Category and Clear Category.
 Create filters for All filters
  1. Select Dashboard > Actions > Add Action > Filter… and make the following selections:
    • Name: Click to Clear All Filters
    • Source Sheets: Ensure that only Clear All is checked
    • Run action on: Select
    • Target Sheets: Bars, Clear Category, Clear Region and Map
    • Clearing the selection will: Show all values
    • Target filters: Selected Fields
  2. Select Add Filter, and enter Region for both source and target, then click OK.
  3. Repeat the above step for Category, then click OK.
  4. Click OK.
You can now use the filter sheets at the top of the dashboard to view profits by region and by category, and then use Clear All Filters on the right of the dashboard to clear your selections.
Did this article resolve the issue?