Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Create a Heat Map with a matrix with multiple variables (or comma separated values in one parameter)

Hi all, I need help with creating a heat map using the Matrix visual (if there is a better one, I'm happy to download it but I have a desktop version only). This is very simple to do in Excel but I c...
  • giammariam's avatar
    giammariam
    3 years ago

    Hey Anonymous. Let me know if the following will work. 

    Notes:

    • The main piece of this is unpivoting the dataset into key-value pairs (see below screenshot).
      • The query in the red rectangle is the original dataset

      • The query in the blue rectangle is a reference query of the original and is unpivoted. This is the one that is used in the matrix.

      • The green rectangle contains the Attribute column (key) and the Value column

      • The purple rectangle contains the Attribute Sort column. This field is necessary to sort the Attributes across the top of the matrix. See here for more info on sorting a column by another column. 

    • I created a font color measure that makes the font color of the cell black if the count is less than or equal to the median total, and white if it is greater than the median total
    • The cell background color for the values is just a regular gradient conditional format

     

    You can download the .pbix here

     

    If this is enough to get you going, please consider kudoing this reply and choosing it as the solution. Otherwise, let me know if you need additional tweaks.