Following a recent trick I leaned on the community (many thanks Rody Zakovich ) , and following the use of this trick to solve another problem (Shapes within Heatmaps?), I thought I'd put a quick Viz together to share with the wider community...
The basic trick is put shapes directly into a calculated field, taking advantage of the fact you can use any ASCII character as the string return of a calculation...and many ASCII characters are things like Arrows/Stars...etc.
The basic trick is shown below
WHEN 'Green' THEN '▲'
WHEN 'Red' THEN '▼'
WHEN 'Yellow' THEN '►'
...It's that simple. This also has the knock on advantage of not messing up your Shape assignment when switching data sources (which seems to occasionally happen)...the obvious disadvantage is that you only have access to ASCII characters and not any image (as you can by importing custom shapes).
I was then asked a question about putting shapes in Tree-maps...and a realized I could use this
On the attached (Tableau 8.3 twbx) I've taken this one step further by employing a second trick to Colour them depending if they are Up or Down.
For those who haven't come across this (and can be used in ToolTips too)....
- You need to create 2 fields (assuming you just have 2 colours to display, but in theory you can have as many as you want). One for when the result is positive, and one for when it is negative.
- In my example here I've created 'KPI Up' and 'KPI Down'
- 'KPI Up': IF [YoY Sales 2013 vs 2012] >=0 THEN '▲' END
- 'KPI Down': IF [YoY Sales 2013 vs 2012]<0 THEN '▼' END
- Notice that there is no ELSE statement, which means if the condition isn't met it equates to NULL, and Tableau doesn't (...well can't) Plot NULLs (Tableau not plotting [or counting] NULLs is a very useful thing to know, and one I exploit very frequently)
- We can then drag these 2 fields on to the Label Tile, and arrange as follows
As you can see I've taken this one step further and created 2 fields (in the same way) for the actual results too.
I can see this technique could have many other applications, and from a Viz point of view it gives the viewer one extra piece of information, without compromising the goal of the Viz. For example in my example, I now also can see (as well as the scale and profitability of the various categories) the Year on Year movement.
Hope people find this useful, and please post any other uses you come across.
Shapes in TreeMap.twbx 351.6 KB