MIP Logo

The Smart Way to Swap Sheets: Tableau’s Dynamic Zone Visibility

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

There are times when a dashboard tries to do too much at once. There are filters, charts, KPIs and legends all in the view at the same time, driving the audience to visualisation paralysis. It can become cluttered and confusing. Sometimes to avoid this we end up over being over minimalistic with limited user control on how to interact with their visualisations, leaving them to wish “ah, I wish I could see this as a Bar chart instead.” That’s where this neat little trick comes in handy called dynamic zone visibility. This powerful feature lets you control when certain dashboard elements appear (or disappear) based on user input. Think of it like a smart toggle, your audience gets to decide what they want to see, and the dashboard adapts instantly.

 The Use Case: One Dashboard, Two Views

Let’s say you’re working with a regional sales dataset and want to give your users the flexibility to view the data in different ways. Some might prefer a straightforward bar chart showing total sales by state, while others may want a map to get a more geographic sense of performance.

Instead of showing both visuals side by side and cluttering the dashboard, wouldn’t it be better to let the user decide what they want to see?

Previously, achieving this kind of interactivity meant layering sheets, nesting layout containers, and setting up sheet-swapping gymnastics with parameters. It worked but it was a bit of a juggling act.

Now, with Dynamic Zone Visibility, you can simply tell Tableau when to show or hide each element based on a condition you control. No more need for workarounds just a responsive design that adapts to user input.

Follow-along Guide

Follow-along with me to build this simple view selector. I am using this Adidas dataset from Kaggle.

Source: https://www.kaggle.com/datasets/heemalichaudhari/adidas-sales-dataset

Step 1: Create the Parameter

Start by creating a parameter called Select View. This will let users toggle between the bar chart and the map. Right-click anywhere in the Data pane > Create Parameter and name it ‘Select View.’ Set the data type to ‘String’ and the allowable values to ‘List’. Then add two values ‘Bar Chart’ and ‘Map’. Select OK à Show Parameter.

Step 2: Create Boolean Calculated Fields for Visibility

We need a field that returns true when the selected view matches each chart type. To do this create a Calculated Field and name it ‘Show Bar Chart’. Use the formula: [Select View] = “Bar Chart”. Repeat this process by creating another calculated field and name it ‘Show Map’. Use the formula: [Select View] = “Map”

Step 3: Build Your Visuals

Bar Chart: Drag State to Rows and Total Sales to Columns. Sort descending. Name the sheet “Bar Chart”. To help illustrate this process I will also filter the region to just the ‘South’ states.

Map: Drag the Longitude measure to column and Lattitude measure to rows. Drag State to detail and Total Sales to colour. Filter the region to ‘South’ You should have a viz like below.

Step 4: Set Up the Dashboard

Let’s bring this all together in a dashboard for our users to interact in. Create a new dashboard à drag in a vertical container. Drag the Bar Chart and Map sheets onto the vertical containers and place them in on top of each other.

Step 5: Enable Dynamic Zone Visibility

Click on the Bar Chart zone (on the dashboard) and open the Layout pane. Tick the checkbox for “Control visibility using value”. Set it to use the field ‘Show Bar Chart.’ Do the same for the Map sheet, linking its visibility to ‘Show Map’. You should now see the dashboard change instantly when the parameter is toggled.

 

Share this post