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:

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.

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:
- 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.

- Now, the Navigator window will display a preview of the data contained in the file. Click on the Load button.

- Thus, the file has been uploaded, and the Excel sheet columns are visible in the Data pane.

- 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.

- Then, drag and drop the fields, Rows, Columns, and Values from the Data pane.
- Rows – Product
- Columns – Year
- Values – Sales Amount and Sales Quantity

- Then, a matrix has been created in Power BI Desktop. Have a look at the reference image.

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.

Now, I will show you how to add and display multiple row headers in the matrix visual.
Steps to follow:
- 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.

- Then, the rows will be added to the matrix visual. Click on the + icon to display multiple rows.

Output:

Display Multiple Row Headers Side-by-Side:
- Then, go to the “Layout and Style presets” of the Format pane and set the Layout to Tabular. Toggle on the Repeat Headers button.

- After that, return to the Matrix visual and first click on the down arrow icon, and then expand all the downlevels in the hierarchy.

- Now, your matrix visual will resemble the one shown in the image below.

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:

Check out the steps below to add multiple column headers:
- 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 ‘Region‘ data along with ‘Year’.

- To display the multiple columns, click “Expand all down one level” in the hierarchy at the top of the matrix visual.

- Now, in the below screenshot, you can see the Power BI matrix with multiple column headers.

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:
- How to Turn Off Grand Totals in Power BI Matrix
- How to Set Column Width in Power BI Matrix Visual?
- Hide or Remove Column Headers on Power BI Matrix Visual
- How to Sort Matrix Column Headers in Power BI?
- Display Multiple Rows in Matrix Without Hierarchy in Power BI
- Display Average Instead of Total in Power BI Matrix Visual
- Replace Blank Values with Zero in Power BI Matrix Visual
- Calculate Percentage of Total in Power BI Matrix
- How to Show All Values in Power BI Matrix

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.