Power BI Matrix also called as Cross tab, is useful to display the relationships between two or more than two groups. Let me show you how to Create a Matrix in Power BI with example.
For this Power BI Matrix demonstration, we are going to use the SQL Data Source that we created in our previous article. So, Please refer to Connect Power BI to SQL Server article to understand the Data Source.
How to Create a Matrix in Power BI
When you drag any dimension field to the Canvas, Power BI automatically creates a table. Let me drag and drop the English Product Name from the Fields section to Canvas. And you can see the table.
Next, let me drag one metric value (Sales Amount) to the Values section and click on the Matrix under the Visualization section.
Clicking the Matrix will automatically convert a Table into a Matrix. From the screenshot below, you can see the Matrix representation of English Product names and Sales Amount.
Let me add one more column group so that you can understand the Matrix. As you can see, we added Customer gender to the Column Groups.
Create a Matrix in Power BI Approach 2
If you want to convert the existing chart into Power BI Matrix, then you can follow this step. As you can see from the screenshot below, we created a column chart, which represents the Order Quantity by English Product Subcategory.
Click on the Matrix under the Visualization section automatically convert the Column Chart into a Matrix.
Let me add the Product Color to the Column Group
Create a Matrix in Power BI Approach 3
First, click on the Matrix present in the Visualization section. It automatically creates a Matrix with dummy data. Next, let me add the product Color as the Row Group.
Next, drag and drop the English Occupation to the Column Groups. Now, you can see the Matrix.
Next, let me drag the Sales Amount to the Values section. It automatically enables the Subtotals and grand totals.
For this Power BI Matrix demonstration purpose, we are adding one more metric field, i.e., Total Product Cost to the Values section.
Let me do some quick formatting to this Power BI Matrix
NOTE: I suggest you refer to Format a Matrix article to understand the formatting options.