6 Replies Latest reply on Jun 3, 2015 4:38 PM by David Romanowski

    Shapes within Heatmaps?

    David Romanowski

      Hi,

       

      I'm looking to see if it's possible to include shapes within a Heatmap.  See below picture for mock up sample of what I am after.  The figures/numbers shown would represent a figure within the current year, but are compared to previous year to see if there has been an increase or decrease.  The calculation/formula that does this comparison I do not have an issue with - there would be a calculated field that determines 'up', 'down'  and 'no change'. It's how I might go about including shapes that displays an up arrow if there is an increase, and a down arrow for a decrease.  Is this possible?

       

      concept.png

       

      Regards,

      David

        • 1. Re: Shapes within Heatmaps?
          Simon Runc

          hi David,

           

          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

          Shapes in Treemap.JPG

           

          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.

          • 2. Re: Shapes within Heatmaps?
            David Romanowski

            Simon!

             

            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.

            HeatMap_Arrows.png

             

            Thank you!

             

            David

            • 3. Re: Shapes within Heatmaps?
              Simon Runc

              hi David,

               

              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...

               

              | Tableau Public

              Build Network Graphs in Tableau - Clearly and Simply

              • 4. Re: Shapes within Heatmaps?
                Chris Sayers

                David, Simon,

                 

                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.

                 

                Cheers!

                Chris.

                • 5. Re: Shapes within Heatmaps?
                  Simon Runc

                  hi Chris,

                   

                  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)

                   

                  Reference Guides: Ascii Numbers

                   

                  I've also now worked this up into a fuller solution here

                   

                  Shapes within Tree-map/Tile-charts (+ many other possibilities...)

                   

                  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)

                  1 of 1 people found this helpful
                  • 6. Re: Shapes within Heatmaps?
                    David Romanowski

                    Awesome!

                     

                    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!

                     

                    Charts.png