4 Replies Latest reply on Nov 9, 2015 10:12 AM by Lucas Brito

    Placeholder for Null values on HeatMap

    Lucas Brito

      I have a view were I am trying to replicate a "matrix" visual, using a heat map. My idea is to color code the squares based on the severity, so if the y and x axis are at "very high", the square should be red, while very high/high should be a lighter red and etc... The problem is by just plotting directly on the heat map, values that don't exist do not display the square on my view. Would it be possible to fill the entire view with the missing squares regardless of existing values and then just use a text counter on top to indicate if there is a record for that square or not?

       

      Expected scenario:

       

      capture3.PNG

       

      Current Implementation:

       

      heatmap.PNG

        • 1. Re: Placeholder for Null values on HeatMap
          Daniel Vincent

          You need to just create a color calc...something like this:

           

          IF [Y Axis Dimension] = 'Very High' AND [X Axis Dimension] = 'Low' THEN 16

          ELSEIF [Y Axis Dimension] = 'Very High' AND [X Axis Dimension] = 'Medium' THEN 15

          ELSEIF [Y Axis Dimension] = 'Very High' AND [X Axis Dimension] = 'High' THEN 14

          ....

          END

           

          You just need to go from top to bottom; left to right so that it finds the first instance then moves on.  Then it's just a matter of putting in the red palette for your numbers.

           

          Another thing is I would create a calc for your records:  ZN(SUM(Number of Records)) that way you have a number regardless.  It will create the box needed for the color.  May not be fully needed but I'm guessing it is.

          1 of 1 people found this helpful
          • 2. Re: Placeholder for Null values on HeatMap
            Zack Gorman

            Hi Lucas,
            Instead of manipulating data to make this work as a heat map, I would recommend using background colors on sheets here instead. Since the 'heat-map' in this scenario is going to be static, I wouldn't bother going through the work needed to make it part of your visualization. Here's the easiest way to do it using background colors.
            Create sheets within Tableau showing the numbers you'd like to see displayed. You can just apply filters to each sheet so that it only shows the one number for each. Using one large sheet won't work, since there's unfortunately no way to make the sheet background different for different sections. Add each sheet individually to your dashboard, and change the background color of the sheet matches the corresponding color on the matrix it's being added to. Here's a very quick and basic version of how that turns out.

            matrix demo.PNG

            Hope this works out for you,
            Zack Gorman

            InterWorks

            • 3. Re: Placeholder for Null values on HeatMap
              Lucas Brito

              Hi Daniel,

               

              Thanks for the suggestion on the ZN function, but after applying it, i don't get the "null" or 0 values that would act as a placeholder. See screenshot below.

               

              null.PNG

              • 4. Re: Placeholder for Null values on HeatMap
                Lucas Brito

                Zhach,

                 

                I had thought about this solution, but i have 3 of these matrixes on my view, so i would need at least 30-40 individual sheets to accomplish this result. My approach at this moment is to add a static background image, and plot the values on the screen using the geo coordinates of the image. Not sure whether it will work 100% yet, but hopefully will help in developing an "easier" solution to manage.

                 

                Thanks for your help.