Hi all,

I hope you are well? I must say, things have been really positive at the moment. I’ve been in a really good frame of mind recently, and found my ‘burners’ between work, personal commitments, sport and a new found interest of doing up my new home has brought me a lot of joy.

Anyway, enough of my internal mental reflections. What are we here today for?

We are going to be taking a look at the use of booleans in Tableau to show and hide aspects of a visualisation. This will be a beginners guide!

Download the workbook to follow along step by step.

Mainly we will look at two examples.

User case 1 that looks to impact the chart itself. We will look to use a boolean to hide layers on a map!

User case 2 that uses dynamic zone visibility that we will use to hide the map, as well as hide containers. Hopefully a good intro for those just finding their feet with DZV.

It goes without saying, if you want alternative learning tutorials that vary in complexity, the likes of Marc Reid, Tim Ngwena and Sam Parsons have all released exciting material on leveraging dynamic zone visibility.

A few of my favourites can be found here:

Marc Reid: Dynamic Zone Visibility – Full Dashboard Tutorial with instructions

Tim Ngwena Swap sheets, containers and more! Dynamic Zone Visibility : New in Tableau 2022.3

Sam Parsons Tableau Best New Feature Dynamic Zone Visibility

Okay lets dive in, the Tableau workbook can be downloaded for free at the top of the page.

Our starting basis will be the build along dashboard – this is so that we don’t need to faff with containers.

First we will look at user case 1, and create a map.

Double click on the Latitude and Longitude calculations to bring them onto columns and rows.

Drag country/Region onto detail as well as State/Province.

By changing your mark to map you should get a filled in map, in Tableaus automatic blue colour.

Off-piste, but now lets create a quick set from the state/province field called State/Province Set and select the top 5 sales field, using the sum aggregation. We will use this to colour the states that are shown in our BANs.

Drag that field onto colour.

Next thing we want to do is add a layer that we an turn on and off at the click of a filter.

To do that we need a parameter.

Create a parameter P. Show Hide Map Marks

It should be a boolean.

Next we want to create a layer that is driven by this parameter.

Create a calculation MP. City

if [P. Show Hide Map Marks] then [City]

This means when the parameter is true, use the city field (a geographic location)

Add Sales to size and recolour in your choosing. Re adjust the map to fit the center of the screen, and then this is ready to add to our dashboard.

Click on the sheet, go to parameters and click our new parameter of Show Hide Map Marks. Now as you toggle between True (showing) and False (Hidden) The map marks from our layer will change between showing and hiding.

How simple was that! Our first user case of using a boolean to show and hide content.

Lets look at the next user case.

Can we use a boolean to show and hide the map at a sheet level?

Lets create a new parameter. Again, a boolean field. Call this parameter DZV Map.

Add this parameter to our dashboard by clicking on our map sheet, going to parameter and clicking DZV Map.

But at this point our map has nothing that links it to the parameter.

This is where dynamic zone visibility comes into play.

If we highlight the sheet and then go to layout, we can tick the control visibility using value and use our newly created DZV Map boolean.

When you change the parameter to false, the map will hide from the screen.

Lets look at one final user case, what if we wanted to completely hide the whole container in blue? We should follow the same logic.

Create a final new parameter this time called DZV Container

Follow the same steps from previous to add the parameter to our dashboard

This time we will want to select our container (blue) when you’re on the container level. Go to Control Visibility Using Value and this time click on our new parameter DZV Container.

Flicking the boolean to false hides the whole container.

That’s it for this week. Hopefully an easy one for beginners to follow along to and try different ways of leveraging booleans to show and hide both layers, sheets, and containers.

I would really recommend checking out the videos referenced at the start of the blog to take this to the next step.


  • Why not try and use parameter and DZV to show and hide multiple sheets using icons.

Speak soon,