Power BI Matrix, also called a crosstab, is useful for showing the relationships between two or more than two groups. Let me show you how to create a matrix in Power BI with an example.
For this Power BI Matrix demo, we will use the SQL data source that we created in our previous article. So, check out the Connect Power BI to SQL Server article to understand the Power BI data source.
How to create a matrix in Power BI
When you drag any dimension field onto the canvas, Power BI automatically creates a table. Let me drag and drop the English product name from the Fields section to the canvas. And you can see the table.


Next, let me drag a metric value (Sales Amount) to the Values section and click on the Matrix underneath Display section.

Clicking on the array will automatically convert a table to an array. In the screenshot below, you can see the matrix representation of the English product names and the sales amount.

Permítanme agregar un grupo de columnas más para que puedan comprender la Matriz. Como puede ver, agregamos el género del client a los grupos de columnas.

Create a matrix in Power BI approach 2
If you want to convert the existing chart in Power BI Matrix, you can follow this step. As you can see in the screenshot below, we created a column chart, which represents the order quantity by product subcategory in English.

Click on the matrix below Display automatically convert column chart to 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 Display section. Automatically creates an array with dummy data. Next, let me add the product color as Row Group.

Then drag and drop the English Occupation into the Column Groups. Now you can see the Matrix.

Next, let me drag the Sales Amount to the Values section. Automatically enables subtotals and grand totals.

For this Power BI Matrix demo purpose, we are adding one more metric field, that is, the total cost of the product, to the Values section.

Let me apply a quick format to this Power BI matrix
NOTE: I suggest you refer to the article Formatting an array to understand the formatting options.
