Dynamic zone visibility in a Tableau dashboard allows you to control the visibility of sections within your dashboard based on user interactions or parameter selections. This feature enhances the user experience by presenting relevant information while minimizing clutter. In this blog, we’ll explore how we can implement this using our classic sample superstore dataset, but to add a bit of a twist, we’ll use a custom chart to act as a parameter filter for this dynamic visibility!

 

Let’s say, we have 3 charts; a map, a line chart, and a bar chart. The goal is to use custom shapes as icons that we can click to reveal one of the 3 charts above.

 

Step 1. Create the Custom Chart

1.a. Use Microsoft Excel to type in the values of your intended parameters. In this case, the title is Values, and the rows are Map, Line Chart, Bar Chart.

1.b. Copy the whole cells, and paste them anywhere in an empty worksheet in Tableau.

This will create a new ‘data source’ and a simple table above.

 

1.c. Drag a copy of “Values” (holding CTRL and drag) to the “Shape” and “Colour” card in “Marks”, then move “Values” to the rows shelf.

1.d. Hide field labels for columns, and untick show headers.

 

1.e. Change “Marks” type to “Shapes”.

1.f. Change view to “Entire View”.

1.g. Customize your shapes.

 

You should have something like this;

 

Step 2. Create the Parameter.

2.a. Click on the down arrow on the right of the search bar in the data pane (as shown below) and select Create Parameter.

2.b. Rename the parameter >
enter ‘String’ as data type >
Select “List” as the Allowable values >
Type in “Map” in the Value box, enter >
Type in “Line Chart” then “Bar Chart” >
Select “Fixed” >
click OK.

2.c. Right-click on the Visibility Parameter > show parameter.

Step 3. Create Boolean Calculated Field

3.a. Create one calculated field for each item in the parameter list (in this case, we have 3 items; map, line chart, and bar chart).

 

Right-click the newly created “Boolean Map” field and select duplicate >
Right-click and select edit on the copied “Boolean Map” field >
Change the name to “Boolean Line” >
In the If [Visibility Parameter = ‘Map’ line, change the ‘Map’ to ‘Line Chart’ >
click OK.
Repeat for “Boolean Bar”.

Step 4. Implement them in the dashboard

4.a. Drag the custom shapes sheet created on step 1 to the dashboard.

4.b. On the main menu, select Dashboard >
Actions >
Add actions >
Change Parameters.

4.c. Rename the Parameter >
On the Source sheet, Select the Custom Shape parameter sheet that we created >
Select Run action on Select >
Select Target Parameter: Visibility Parameter that we created >
Select Source Field: Values (based on a simple table title we created in Excel) >
Select Clearing the selection will: Keep the current value >
Click OK.

4.d. Click on the sheets of interest in the dashboard (Map, line chart, bar chart) For now let’s select the Map >
On the left-hand side, select Layout >
Under “Selected item”, tick “Control visibility using the value” >
On the down arrow that just pops up, select “Boolean Map”.

Repeat for the Line chart and Bar Chart.

Now the shapes should work as a trigger to hide/reveal the map/line/bar charts!

For instance, only the map chart appears as we only select the map shape.

Dynamic zone visibility enhances the interactivity and usability of your Tableau dashboard. By following these steps, you can create engaging dashboards that respond to user interactions, allowing them to focus on the information that matters most! Happy vizzing!

The Data School
Author: The Data School