Time is a luxury at the moment, so I’m deviously blending #TakeapartTuesday with #MakeoverMonday this week, to give me a chance of completing #WorkoutWednesday! It’s a fantastically busy time in the Tableau community, but it’s colliding with a busy spell at work so I need to make some compromises.
This week, I’m looking at Adam Crahen‘s #MakeoverMonday submission. He banged it out not long after Andy shared the data, and when I dig into just what Adam did in that short period of time, frankly I’m in awe.
The first part of Adam’s dashboard is the horizontal bars, showing spend by Category, and even though it’s a basic looking chart, it features the sneaky use of one of those random-looking MIN(1) calculations that I’ve never really understood. Here’s the structure:
Some of it obvious, some of it less so. The beauty of the MIN(1) calc is that it does this:
The MIN(1) is obviously 1. If I set the aggregation to MAX it works the same, but an AVG gives you this:
The key point is that a MIN or MAX aggregation of 1 generates a centralised point of reference in the pane, and its own Marks card. What can we do with a Marks card? Set it to Text and then create a snazzy looking column showing the Category and sum of transactions:
After depositing the relevant Dimensions and Measures onto text, you need to do a bit of formatting:
Adam makes further stylistic tweaks by making the value “pop” from the label, by setting the Category to a slightly subdued grey. It’s yet another subtle but effective piece of design, and these things really add up.
By now, we’ve hidden the Category Header as it’s redundant given the labelling of the MIN(1) axis. The inclusion of value within that label also means that the x-axis is superfluous, so it’s a great bit of space-saving. Further tidy up involved the clearing of gridlines from MIN(1). I then needed to get a line between the rows, which was just a quick bumping of the Row Divider Level:
The next apparently insignificant aesthetic genius in Adam’s worksheet is his use of shading in the title. Design is absolutely not my forte, and this is a tiny “tip” that I assume most people already know: you can right-click a title and tweak shading, borders etc.:
I didn’t know it, and now I do. Design is such an important element of data visualisation, and it’s quite hard for me to actually grasp all of the nuances of achieving a “complete” dashboard. Adam also shaded his worksheet to soften the impact of his bars, but I’m quite comfortable with my replication of his work at this stage, so I’ll bypass that step. Next – a sheet summarising spend by date and merchant.
Here, it is important to ensure that you hold both a discrete version of Exact Date on Rows, as well as Merchant. If you don’t have the relevant date in the view, things go wrong:
And that makes perfect sense. If you implement an action filter, then Tableau needs to know what to filter based upon, else it will just return all instances of the Merchant, irrespective of date.
The action filter I refer to is triggered by the final worksheet – a dual-axis Area / Line jobby, which is nice and simple. The Columns and Rows are like this:
The triangular Delta symbol denotes the presence of table calculations, and what simple beauties they are:
I just created this once, replicated it on Rows and set one Marks card to Area and one to Line. A bit of clean up and annotating the new family car gets you here:
So now it’s the construction phase of the dashboard itself, and this is often tricky for me. I start by mimicking Adam’s 375 x 1600 layout. At the top of the viz, I need a horizontal title bar, overlaid with an image of an American Express credit card. That’s just a Floated Text Object with right-aligned text and shading, plus a Floated Image. Adam’s image has perhaps been cleaned up as it doesn’t have the white borders that cut through my title bar, but I can live with this at this stage of my development:
Adam also floated a little Text Object over the card to show Andy as the cardholder, so I copied that too:
Next, a duo of text boxes break up the view. This includes one where an overly-complicating mind (such as mine) would presume the inclusion of calculated fields and fanciness. Not so:
Directly under that text box is a URL thingy to giphy. I don’t know what that really means, but a right-click on Adam’s viz revealed a URL so I just copied that, pasted it into a Floated Web Page Object, lined up the coordinates with the text box shown above, and then dialled down the opacity of that text box shading to 80%:
I at least find that really cool. What looks like a really fancy thing is really simple to achieve, so kudos to Adam for doing it, and to Tableau for enabling it. Now we dump the dual-axis chart onto the dashboard, and shove the Merchant data underneath it.
At this juncture, I recognised a bunch of stuff I’d either missed beforehand, or now needed to consider. First of all, I’d missed the title on the Merchant view:
Two key elements here. First is the basic date truncation of the date:
Second is the means of summing up the total amount spent in that week. As Merchant is in the view, we need to make use of a Level Of Detail calc to achieve this:
I did this differently to Adam, but that’s fine because it works, and it better fits with how my brain processes logic.
Flitting about somewhat, I then noticed that I needed to show this “Week” view on the dual-axis chart, and that just required me to drop it wrapped in ATTR() on Detail:
For me, that level of formatting on the tooltip represents progression, as I usually leave them on default. It merely entailed this:
Variable font size and some dashes. Improved aesthete does not expend energy. Now I needed to set up the dashboard action so the dual-axis chart filtered the Merchant view on hover:
“Leave the filter” ensures that the Merchant view doesn’t go blank when a hover strays off page (Exclude all values), nor shows everything when the same haphazard mouse control occurs (Show all values).
Finally, I just needed to add the bar chart (ensuring that the dashboard action did not filter that), and then the text box at the foot to cite the source and inspiration of this rebuild. I came to realise that Adam’s dashboard shading added a lot to the overall “feel” of the viz, so I need to consider that in future, but overall I’m happy that I learned a lot from this process. My final workbook is here.