Eva Murray‘s #MakeoverMonday recap post this week highlighted the cream of the crop from week 20. Deservedly nestled among Eva’s favourites was a great submission from Michael Mixon, whose standard is always very high, and whose consistent quality of design is regularly the subject of praise from the Tableau community.
There is plenty to admire with Michael’s visualisation, but as Eva points out, the dual-axis chart manages to squeeze in a lot of information in a smallish space, and yet it manages to remain clear and uncluttered:
Originally, I assumed that this was achieved by first creating a Gantt for the adult unemployment rate, and then a dot-plot for the 15-24 age group. However, I then recalled that you (frustratingly) can’t dual-axis two sets of Measure Values in Tableau. So how did Michael manage to create this view? This confused me for longer than it should – it’s clever!
Looks like a standard dual-axis. In Columns we have the same calc, duplicated:
Easy enough. One of these pills is plotted as a line (with Demographic on Path to create the horizontal “link”):
If I remove the second green pill, this leaves us with this:
Losing the circles loses the “ends” to the dot-plot. More embarrassingly, with hindsight the ongoing presence of the adult metrics in the view should have made the penny drop much faster in my head…..
Regardless – at this stage we know that the youth metrics are bog standard dot-plots, which I summarised in this post. So how exactly do the equivalent adult metrics get plotted? The image above is a freaking big clue, and right-clicking the y-axis confirms the solution:
A bunch of Reference Lines! Doh! One to show the average Adult Male % Unemployed:
A replication of this where [Demographic] = “Women” enables you to plot a Gantt-esque pair of data points for all countries where data exists:
But how to bridge the gap between the points? What was that third Reference Line element that I’ve stripped out? It was a Reference Band! Double-doh! I forget this so often that I’m sure there’s a hole in my head specifically to allow this piece of knowledge to escape on a regular basis:
That just says:
Create a Reference Band at a cell (i.e. Country) level where you Fill the gap grey between the average Male and Female % Unemployed Measures
Standard functionality, useful functionality, and functionality I forget ALL THE TIME! And that is how Michael creates the effect of a dual, dual-axis chart. One more thing – ever the consummate professional, Michael adds in one more calculation to handle the fact that no adult data was available for Barbados and the Bahamas:
The second image in this post shows the presence of that calculation, wrapped in ATTR(), on the Detail Card, so it could be included in the tooltips, which are constructed like this:
Sticking them after the % Unemployed measures for adults means that where the data does not exist, hovering over the tooltip reveals the [Missing Adult Unemployment] calc:
That is an eye for detail and a pride in your work to make sure that sparse data is highlighted as such and not just left as a blank space.
Hopefully this post serves to highlight the old Reference Band / Line trick to a few people, and massages my ego by identifying that I’m not the only poor soul who forgets this feature / was unaware of use cases for it.