Hi there, in this blog I'm going to be discussing how I created a sports performance profile in Tableau using the feature, Dynamic Zone Visibility.
I am aware that there has been much excitement around this feature within the Tableau community, and many blogs and demos have been written and recorded. So, therefore, I want to share some ideas I have used, rather than just showing how the functionality works!
For context, I have taken data from the 2022 Diamond League season, for Women’s 100m athletes.
So, athletics data, a series of races across 2022. Each row in the data is an individual performance by an athlete.
See dashboard link: https://bit.ly/diamond_league
In the dashboard I have created, the uses for this feature include:
- Drill-downs
- Sheet swapping (credit: Tim Ngwena
- Zooming (credit: Sam Parsons)
- Dynamic analysis, dependent on selection criteria (credit: Marc Reid)
And the world really is your oyster with this! There are plenty more possibilities. It's all up to your creativity!
Let’s dive into how to configure this functionality.
On a dashboard you configure by selecting an object, and navigating to the Layout pane.
At the top, you have 3 tick boxes.
The bottom of which is “Control visibility using value”.
Once I check the box, I can select a field.
There is criteria for the values you can use, therefore:
You will only see boolean fields, boolean parameters.
And fields with a single value which is unaffected by the viz. (So, certain LODs).
Example 1 - Show/Hide
I set up a parameter called Selected Athlete, and used parameter actions to update this with the name of the selected athlete.
The DZ calculation then calculates a boolean based on the value in the parameter.
The dynamic zone object will appear when the boolean evaluates to TRUE and will hide when the result is FALSE.
In this case, I want anything other than the word ‘None’.
I included a Reset button that has the value ‘None’, to make the calculation evaluate to FALSE and therefore hide again.
In my case, I selected a whole container as the dashboard object I wanted to reveal and hide, so that selecting an athlete bar would trigger their profile to appear.
Example 2 - Zooming
Likewise, I have a parameter called “Zoom1”. In this use case, my aim is to zoom into the race profile to see the marks up-close.
The bottom bar chart has dynamic zone applied.
True or False is passed to this Zoom1 parameter by selecting a '+' shape or a 'x' shape which has the True or False assigned to it using the calculation below.
You will see that the bars below disappear and the chart enlarges to fill the space (to give a zoom effect).
Example 3 - Sheet Swap
Sheet swapping used functionality we could only achieve through filtering sheets.
Now with DZV, instead I created a Boolean parameter, and aliased True with "Rank" for my leaderboard chart and False had the alias of "Finish Time".
I placed this parameter on the dashboard, and selected the container with the leaderboard and venue breakdown charts in. Selected "control visibility using value" and chose the parameter.
This is step one. I have control of these 2 charts. But, I want to alternate them with another view.
For the chart I wanted to swap in, I needed to create the inverse logic. Rather than True=Show and False=Hide, I wanted this chart to show when the parameter=False and Hide when the parameter=True. Hence, the calculation above.
I then brought the race track view into the dashboard, placed it next to the container it is replacing, and configured the dynamic zone to use the calculation I just created.
Example 4 - analysis changes dependent on selections
Each of those used a parameter, I’m sure you are curious about LODs, so let’s have a look.
The second dashboard is configured using a set rather than parameters, to allow for multi-select.
If you look at the configuration of the profile at the top, you can see that each sheet has a different calculation, specific to the number of athletes selected.
Race track view is for 1 athlete in the set.
Side by side comparison for 2 athletes in the set.
Podium view for 3 athletes in the set.
You can see in the calculation tests to see if the value for an athlete is 1 or 0. And then sums those up across the data set. There is an extra {MAX()} required to get this to work, this was something noted by Marc Reid in his blog. Not sure why, but it gives us our desired result.
At the end of the day, because you are setting conditions for when to show and when to hide, it is up to your creativity which scenarios you want to create or cater for!!