How to Create a Correlation Matrix Heatmap

Correlation heatmap visualizes correlation coefficients among different variables in your dataset. Each cell shows how strongly two variables are related, with color intensity indicating the strength.


To visualize correlation among multi-dimension data, correlation matrix can be created using heatmap visual. Generally correlation values lie in the range from -1 to +1, with:

  • +1 shows perfectly positive correlation
  • 0: shows no correlation
  • -1: show perfectly negative correlation

Data Requirements

Before proceed, you should have data in the following format:

Correlation Data

Your dataset should contain 3 fields:

  • Variable and Variable_Dup: This columns are paired together to create each possible pair of their values.
  • Correlation value: Correlation value for each pair of Variable.

Import Heatmap Chart visual in PowerBI

The first step is to import Heatmap visual in Power BI. You can acquire heatmap visual from:

  • standalone pbiviz downloaded file from the website
  • or from AppSource
  • or as a part of your suite purchase deployed in organization repository

Once you decide the source of acquisition, you can import the visual following this documentation


Add Fields to the visual

  • Map Variable to Horizontal Axis.
  • Map Variable_Dup to Vertical Axis.
  • Map Correlation value to Color Value.
  • Optionally you can use Small Multiple to create multiple Correlation Matrix in one visual.

Formatting

  • Heatmap: Use "Upper left" or "Lower right" Display modes to avoid duplicate correlations under Format Visual -> Heatmap:

Format Heatmap

  • Color axis: Select the required color scale from Color axis -> Color -> Color Scale. If you want to define your custom colors for color scale you can do so by defining your colors in Color axis -> Custom color. You can also experiment with Stepped colors and Blend features:

    Color formatting

  • Vertical axis: If required, invert the vertical axis under Format visual -> Vertical axis -> Layout, to achieve different combinations of Correlation Heatmap:

Format Vertical Axis


Result

The correlation heatmap will show:

  • Symmetric matrix: Each variable pair appears twice (if used full matrix display type)
  • Color-coded relationships: Strong correlations are more intensely colored

Correlation Heatmap


← blogs