Create a Matrix Visual in Power BI

Do you want to learn how to use a matrix visual in Power BI? I will help you with some Power BI matrix examples.

In this Power BI tutorial, I will explain Power BI Matrix visualization. Along with this, I will also cover some more topics mentioned below:

  • Introduction to Power BI Matrix
  • How to Create a Matrix Visual in Power BI
  • How to Add & Display Multiple Row Headers in Matrix Visual
  • How to Add & Display Multiple Column Headers in Matrix Visual

What is a Matrix Visual in Power BI

A Power BI Matrix is a visualization that displays your data in a grid format, similar to a pivot table in Excel. It allows you to organize data using rows, columns, and values, making it easy to summarize, analyze, and compare data across multiple dimensions.

The Matrix visual also supports features such as hierarchical grouping, drill-down, and conditional formatting, allowing users to explore data at various levels of detail without cluttering the visual. This makes it a powerful tool for presenting complex data in a structured and intuitive way, helping users gain deeper insights from their datasets.

You can see the Power BI Matrix visual in the screenshot below:

Create a matrix visual using Power BI

Check out Display Power BI Matrix Visual in Tabular Format

Create a Matrix Visual in Power BI

Now, let’s see how to create the matrix visual in Power BI.

To create a matrix, I will use an Excel file containing ‘Sales‘ data stored on my local desktop, with the columns shown in the screenshot below.

Power BI Matrix

From the given data, I wanted to create a matrix showing sales by ‘Product‘ on rows and Years in Columns with Sales Amount and Sales Quantity.

The file is ready now, let’s connect it to Power BI Desktop.

Follow the Step-by-step process to create a matrix in Power BI:

  1. Open the Power BI desktop app. On the Home screen, click ‘Get data‘, from which you can also add data sources. I have an Excel file, so click on the Excel workbook. Otherwise, you can directly select the ‘Excel workbook‘ from the Home tab.
Matrix visual in Power BI
  1. Now, the Navigator window will display a preview of the data contained in the file. Click on the Load button.
How to use matrix in Power BI
  1. Thus, the file has been uploaded, and the Excel sheet columns are visible in the Data pane.
Create a matrix in Power BI
  1. At this point, click on the ‘Matrix icon ‘from the Build pane on the right-hand side, or you can insert it from the Visual gallery on the Home tab.
    • It will add an empty matrix visual without data.
Power BI Create Matrix
  1. Then, drag and drop the fields, Rows, Columns, and Values from the Data pane.
    • Rows – Product
    • Columns – Year
    • Values – Sales Amount and Sales Quantity
Matrix in Power BI
  1. Then, a matrix has been created in Power BI Desktop. Have a look at the reference image.
Create a Matrix visual in Power BI

Now, let’s move on to displaying multiple row headers in the matrix visual using Power BI.

Now, let me show you some of the matrix visuals’ useful functionalities.

Check out Power BI Matrix Visual Conditional Formatting

Display Multiple Row Headers in Matrix Visual Power BI

Let’s see how to display multiple row headers in a matrix visual using Power BI.

The image below shows only one Row header in the Matrix visual.

Display Power BI multiple Row Headers

Now, I will show you how to add and display multiple row headers in the matrix visual.

Steps to follow:

  1. On the Power BI canvas, select the matrix visual. Ensure that you have added the rows you want to display in the Rows section of the Build Pane. Have a look at the image below.
    • In my case, I’m adding the ‘Store Type’ field as the Row data along with Product.
Power BI matrix multiple row headers
  1. Then, the rows will be added to the matrix visual. Click on the + icon to display multiple rows.
Add Multiple Row Headers Power BI

Output:

Power BI Matrix add Multiple Row Headers

Display Multiple Row Headers Side-by-Side:

  1. Then, go to the “Layout and Style presets” of the Format pane and set the Layout to Tabular. Toggle on the Repeat Headers button.
Matrix multiple row headers Power BI
  1. After that, return to the Matrix visual and first click on the down arrow icon, and then expand all the downlevels in the hierarchy.
Add Power bi matrix multiple row headers
  1. Now, your matrix visual will resemble the one shown in the image below.
Display Multiple Row Headers Power BI Matrix

This is how to add and display multiple row headers in a Power BI matrix visual.

Check out How to Sort Column Values in Matrix Visual Power BI?

Display Multiple Column Headers in Matrix Visual Power BI

Let me show you how to display multiple column headers in the Power BI matrix visual.

The image below shows the one column header [Year] in the matrix visual:

Power BI matrix multiple column headers

Check out the steps below to add multiple column headers:

  1. In Power BI Desktop, select the Matrix visualization. On the Build pane, add the fields that you want to display in the matrix visual into the ‘Columns‘ section.
    • Here, I’m adding ‘Regiondata along with ‘Year’.
Power BI Matrix add Multiple Column headers
  1. To display the multiple columns, click “Expand all down one level” in the hierarchy at the top of the matrix visual.
Matrix multiple column headers Power BI
  1. Now, in the below screenshot, you can see the Power BI matrix with multiple column headers.
Add Multiple Column Headers Power BI Matrix

This is about how to create a Matrix visual in Power BI Desktop. I have also discussed displaying multiple row headers and column headers in the Power BI Matrix.

I hope you found this tutorial helpful. Please share your suggestions in the comments section below.

You may like the following Power BI visual tutorials:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…