Use Cases for Dynamic Zone Visibility

Priyanka Dobhal
6 min readJul 3, 2023

--

In the 2022.3 release, Tableau launched an interesting feature called Dynamic Zone Visibility.

What is it?

With Dynamic Zone Visibility, you can hide or reveal zones (tiled or floating dashboard elements) based on the value of a field or parameter. As you interact, zones on your dashboard appear or disappear. The result is a dynamic dashboard that doesn’t compromise your desired layout.

To be used for Dynamic Zone Visibility, a field or parameter must be:

  • Boolean.
  • Single value.
  • Independent of the viz, meaning the field returns a constant value independent of the structure of the viz, such as a fixed level of detail (LOD) calculation

But can’t we do that already using Show/Hide containers? Yes, probably we can but not everything. So let us take a look at some of the use cases of dynamic zone visibility.

Use Cases

1. Swapping Worksheets

You may have done sheet swapping using parameter in the past. But one problem that still arises in that method is hiding the title of the worksheets. Unfortunately, the worksheet will be completely hidden only when we manually hide the title.

But now we can hide the worksheets by using a parameter to control the visibility of worksheet.

▪ Create a string parameter with the list of Sheet Name. You can even create a internal list parameter and change the display name to Sheet Names. For example

▪ Create calculated fields for each value in your parameter list that return true/false if that value is selected in the parameter. For example, [parameter]= ‘Sheet 1’. If you are using an interger list paramater then assign it to the number.

▪ Bring both the worksheets on the dashboard, and assign the respective Boolean Calculated fields to “Control visibility using value” under Layout

Similarly, you can even control any legends that is specific to a worksheet.

And that’s all you have to!

2. Show Detail

Taking an example of a real scenario that I came across at work. I was suppose to hide a container which had 2 worksheet, one legend and one filter based on the selection of another worksheet. Now a part of this again can be done using Filter Action using the “exclude all values” on clear. But we cannot control the filters, legends and again the Title of the worksheet.

So how do we do this using dynamic zone visibility?

▪ On worksheet 1 (which has to be used to control the container), add a dummy boolean field — TRUE.

▪ Create a boolean all value parameter.

▪ Create a parameter action to assign TRUE to the boolean paramater. Also, under “Clearing selection will” choose FALSE.

▪ Now assign this parameter field to control the visibility of the container.

That’s it.

3. Collapsible Charts
Now this particular use case can be done in more than one ways for sure. We can do something similar quite easily with a Show/Hide menu button itself. But if you are curious to see how it is done with dynamic zone visibility, here we go!

▪ Create as many boolean paramater as you need for the buttons.

▪ Next create one calculated field per button which would return output as TRUE or FALSE. For example, [parameter for button 1] = TRUE

▪ But how would this become TRUE? To get that we will again create a dummy boolean calculated field as TRUE and put that on the marks card under detail.

▪ Now onto the dashboard, create a paramater action to capture TRUE from the worksheet.

▪ When you clear the selection, set a value of FALSE.

4. Control Filter & Parameters

Have you ever wanted to make a parameter depended on the selection of another parameter? Well, now you can do that easily with dynamic zone visibility.

▪ Create a calculated field that returns a Boolean output based on your first paramater.

▪ Now control the visibility of your second parameter(s) using the above calculated field.

And that’s it.

Now let us discuss another scenario. The inspiration for this came from a extension which I had recently tried out. Using the extension, we can control which filter, worksheet or even container we want to enable.

So I created the same idea using a dynamic zone visibility

▪ Create a static list of all the filter names you need. For example,

If you cannot use a static list, make use of any of the existing discrete field which has at least the same number of filter values.

▪ Next create a set from the new field for filter value. And use that to build a worksheet as below

▪ Create a boolean calculated field to control each of the filters.

▪ Firstly check if the filter values is in the set:
IF [Value Set] THEN [Value] END

▪ Next, create a boolean calculated field which would return TRUE if the filter value is selected

{IFNULL(MAX([Selected Value] = ‘Category’),FALSE)}

5. Control Section

We can control what data is visible to users using User Filters. But Can we control what section is visible to whom? Yes, now we can.

For example, If FULLNAME() = <My Name> then we will show section 1 and 2. Otherwise, we will only show section 2. So section 1 won’t be visible to you.

That brings us to the end of this post. Hopefully, I didn’t bore you here :)

Here is the link to the workbook:

https://public.tableau.com/app/profile/priyanka.dobhal0993/viz/HowToVizUseCasesforDynamicZoneVisibility/UseCases

Do you have any other uses cases for Dynamic Zone Visibility? If so, do share it with us in the comments section.

Priyanka Dobhal

Twitter | LinkedIn | Tableau Public

--

--

Priyanka Dobhal
Priyanka Dobhal

Written by Priyanka Dobhal

An introvert, tiring to break out of my Cocoon. Turns data into visual: https://public.tableau.com/profile/priyanka.dobhal0993#!/

Responses (1)