With the introduction of Dynamic Zone Visibility in version 2022.3, sheet swapping, changing date levels in views, and hiding or showing controls or legends just became much easier to set up and use. So how do you set up DZV and where can they be used?
See the video at Link to DZV
Dynamic Zone Visibility (DZVs) are created on the dashboard giving you the means to float, display a title or control the visibility of objects. They can be applied to individual worksheets, to the contents of a container, or to nested containers. And they are much easier to set up than other methods you may have used.
1 Set up
DZVs are set up on the Layout Tab of the Dashboard in 3 steps
- Select the object -worksheet or container
- Choose the options to be controlled
- Select the Boolean field that will trigger the DZV
If the DZV is applied to a container (or nested containers) all objects in the container will be made visible or hidden based on the Boolean trigger – (a True – False value). The trigger can be the result of a user-selected parameter value (either from a drop-down or parameter actions), a calculated field, or manually selected by the user.
2 Show Category based on parameter
The first example will show or hide a simple line chart based on a parameter selection. The end goal is to create a chart like below where the user can select a single chart to show or show all 3 based on a parameter selection:
First, create a parameter used to select the view:
I added All manually to the parameter values.
Now we need to create 3 line charts, one for each category
There are 2 calculated fields added to each of the sheets – the first is a simple TF filter on Category applied to the filter shelf – the second is the Boolean that will be used to trigger the DZV:
[Select Category ]= "Furniture" or
[Select Category ]="All"
The "trigger" is added to the Marks card ( not the filter shelf)
Repeat the process for the Office Supplies and the Technology categories and create a dashboard placing all 3 worksheets in the same horizontal container
Next, open each worksheet (click on the individual worksheet in the container), go to the Layout tab of the object, and set up the DZV:
Select the Boolean test for each worksheet from the dropdown and you are done –
selecting a single category from the parameter returns this
At this point, you are probably thinking that DZV is pretty much a sheet swap and while that is true it is much easier to set up and build upon that base.
3 Add a variable date level to the view
I added another parameter to each of the sheets of control the date level – Year/Month/Quarter –
and based the date axis on that parameter value using:
date(datetrunc([Select Date Level],[Order Date]))
With that addition to each sheet, the user can control both the user can vary the category or the date level of the individual sheets or all three
4 Controlling multiple charts in the view
The same Boolean fields used to control the visibility of the category line charts can also be applied to other charts in the view –
I duplicated each of the line charts and changed the chart type to box-and-whisker. Then duplicated the previous dashboard and nested 3 vertical containers in the horizontal container that housed the category line charts. In each of the vertical containers I placed the category line chart and its corresponding box-and-whisker chart and finally set up a DZV on the entire vertical container
Changing the Category parameter will return both charts for the category
5 Adding in a parameter action
You may want to make it easier for your user to drive the DZV from the visual and not a dropdown. That is easy enough to do by adding a parameter action to the viz and a value picker – here I use a simple bar chart for total sales by category as the value picker:
Selecting Office Supplies for the bar chart yields:
Clearing the selection will display all 3 category charts.
6 Building a map-driven sheet swap with DZV's
Some users want to start with overall national data and then deep dive into view by states. I like to use a map and a parameter action to drive to the state level.
Create a map and also a parameter on State but manually add "All" to the parameter list
Now we need a parameter to select the view to show:
Next create the individual worksheets you want to show on the dashboard – here I started with 3 – one for a text table, one for a bar chart, and the last for a trend line –
to each, I have included a Boolean trigger similar to this
[Select View Format]="Bar"
and a TF filter to based on the State parameter value
[State/Province Parameter]=[State/Province] or [State/Province Parameter]="All"
For this first dashboard, I just created a view for the map and a second container where I loaded all 3 view formats (bar, text, or line) in the same container.
In the lower panel of each of the view format worksheets, the visibility is controlled by a DVZ Boolean trigger
Selecting a State from the Map triggers a parameter action
to zoom the map and filter the lower chart
7 Popping a container into the view
Sometimes you may want to let the user decide to pop a chart into the view or hide it based on a parameter selection. I modified the previous example by placing a side panel container on the dashboard. I then created a second set of text, line, and bar charts based on customer counts. Each has the same Boolean trigger and DZV setting as their corresponding sales charts. Then all 6 are placed in the vertical containers nested in the sidebar. and finally, I created a Boolean Show Hide parameter and applied it to the entire sidebar:
Now the entire sidebar can be hidden
8 Mixed Chart Types
Up to now, I have used the same chart type in the DZV but that is not a requirement. Some users want to see a text table with values below their graphical charts. Here, I used the previous example and duplicated the line and bar charts as text tables preserving the Boolean value trigger on each sheet.
The finished dashboard will zoom to the state filtering the graphical and text table charts in the process
9 Show/Hide instructions and controls
When you first introduce a new viz it is best practice to include instructions for the user on how to make parameter and filter selections. But as users gain experience you would like to de-clutter the viz by hiding those instructions. DVZs make that possible.
Here I added an Instruction worksheet and floated it across the dashboard – it is just a simple text chart with step-by-step instructions on how to make selections but I also added an "Instruction Show/Hide" Boolean filter – I placed it on the dashboard so it is visible when the workbook is first opened
The Boolean parameter used as a trigger for the DZV is just:
Which I set up using the Radio Button Option
Finally, the Instruction Sheet is floated over the dashboard and the visibility is controlled like this:
Selecting the "No" Radio Button hides the instructions
I went 1 step further and added a container to the viz and placed all the legends, filters, and parameter controls including the Instruction parameter – into a single container. And repeated the process to allow the experienced user to hide all the controls
and selecting "Hide" returns
You may have other examples – I would love to hear about them – feel free to reach out
The workbook with all the examples shown here can be downloaded at Link to Workbook
Hope you enjoyed