Good question, this was a fun one to solve...
This takes advantage of a little trick I found the other day, where by you can use any ASCII character as a return string for a calculated field....and some of these characters are actually arrows and such like! I've also employed another little trick to get the up and down to colour red and blue
I've created the KPI field twice, one which equates when the SUM of sales > 80k, and down otherwise, in the form
IF SUM([Sales]) > 80000 THEN '↑' END
I've then brought both these fields onto the text shelf, and set up the text box as per the below
As the false condition of each KPI formula is NULL, and Tableau doesn't plot NULLs when one is showing the other vanishes, and so I can give them 2 different colours.
You can probably find some better arrows (I just looked in the Symbol section of word!), but hopefully you can follow the technique.
Shapes in TreeMap.twbx 319.6 KB
You're a Legend!
It's always amazing to see that there are always work-around to get the small things to work in Tableau and you've just demonstrated that.
I was happy just to get the arrows in there with the ASCII characters, but to take it one step further with colours and taking advantage of the nulls was an icing on the cake.
Below is a sample of what I've end up with, the arrows and the % shows the change from previous year without showing previous years data.
No problem, and yes really like your final version...I hadn't thought of doing this, but will definitely be using going forward (it just adds that one extra bit of explanation to the Viz)....This is why I love the forums, you learn so much answering others questions.
You've hit the nail-on-the-head on why Tableau, IMHO, is so much better than other Viz tools. Rather than providing lots and lots of native chart types, the consistent way that all chart types are created through a combination of Position (Row/Column shelf), Size, Colour, and Mark Type means that imagination is the only obstacle to creating any chart type you want. For example there is no 'Word Cloud' in the 'Show Me', but if you change the mark type on your tree map to Text (from Square)....You'll get a 'word-cloud'
Here are a couple of my fave creative uses...
This is fantastic guys! Definitely adds a ton of value in a very concise format. I will make use of this for sure.
I do have one question, I'm a step behind you two. How are you getting the ASCII values? I would normally go to a
font like Wingdings or Webdings to get them but Tableau doesn't have those fonts.
Showing that step would probably be useful to many others as well.
1 of 1 people found this helpful
Glad you found it useful.
For this solution I just (a bit hokily...if that's a word!) used the 'Insert' > 'Symbol' in Word, and then copied and pasted them!!
However, here is a link to all the ASCII Character Sets (just copy and paste the symbol you want into the formula)
I've also now worked this up into a fuller solution here
I'll add this extra bit of info, over the next few days (btw in the above link I've used 9650 for Up & 9660 for Down)
I actually had to tweak the viz back to barcharts as the heatmap was taking up too much space and demanding too much attention on the dashboard I've been creating.
However I am still able to utilise the concepts Simon has shared by using the ASCII shapes as labels which I think is just as useful for showing growth to previous year.
See below for two examples - thanks again!