/
Guide to creating heatmaps in Tableau

Guide to creating heatmaps in Tableau

Heatmaps are a way to represent data visually using colour-coded cells arranged in a grid. The colour of the cells indicate the value, typically with darker colours representing higher values and lighter colours representing lower values. These colours allow users to quickly identify trends or outliers in a large dataset. More information about when to use heatmaps with examples can be found on tableau’s website.

How to create a heatmap:

  1. Drag the fields you want to the rows and columns shelves in the same way you would create a table.

  2. Drag the variable you want to colour by to the ‘colour’ shelf on the marks card.

    1. If the variable you want to colour by is a measure then change the marks type to Square and the colour should fill each cell.

    2. If the variable you are colouring by is a dimension this will likely not work and instead you will see squares like below which overlap each other and do not fill the whole cell. 




      1. If this happens change the marks type to Gantt Bar and create a variable min(1) in the marks card and add it to size. This should now colour the cells as expected.

  1. Tableau should now have automatically coloured your table, with higher values in a darker colour but you can use the colour key on the right of your screen to change the colours used. In the NSS workbook example below I have used a Custom sequential key, selecting a turquoise to be the darkest colour. The highest scores for Teaching on my course and Learning Resources for Oxford can be seen in the darkest colour, and Student Voice for Oxford and Assessment and Feedback for Edinburgh can be quickly identified as the lowest scores.

Extra tip

If you want to further adapt the colours of your heatmap you can use a formula to set a different scale.

On the screenshot on the left I have just put ‘Score’ on colour. On the screenshot on the right I have created a calculated field ([Score]-50)^3 and put this on colour. Creating a formula like this maps values of score to colours non-linearly, making more extreme values stand out. You could also use this to reduce the effect of more extreme values. It takes some trial and error to find the ideal formula but using exponentiation/powers can help to emphasise extreme values while log functions or powers less than one will reduce the impact of more extreme values.

 

 

Related content