How to Format Power BI Matrix report with an example? The Power BI Formatting Matrix includes changing the Matrix Grid Colors, Row formatting, Column formatting, row and column colors, Matrix Title text, background color, etc.
To demonstrate these Power BI matrix formatting options, we will use the Matrix we created earlier. Please click on the Format button to see the Matrix formatting options available in Power BI.
Please refer to the Connect to SQL Server, Matrix, and List of Charts articles to understand the Power BI Data Source.
Format Power BI Matrix General Settings
Use this General Section to Change the X, Y position, Width, and height of a Matrix.
Format Power BI Matrix Style
From the below screenshot, you can see the list of styles that are available to style this Matrix. Please select any style as per your requirement. We are now selecting the Alternating Rows option from the drop-down list. It adds alternative row colors and Black color to the Header, Subtotals, and Grand totals.
The following options are available for you to format the Power BI Matrix Grid.
- Vert Grid: Add Vertical Grid to the Matrix by toggling this property from Off to On—nothing but enabling Vertical line to separate each column.
- Horiz Grid: Add a Horizontal Grid—nothing but enabling a Horizontal line to separate each row.
- Horiz Grid Color: Changing the Color of a Matrix Horizontal Grid.
- Horiz Grid thickness: Matrix Horizontal Grid Line width
- Row Padding: Space between the rows.
As you can see from the screenshot below, we changed the grid color to gold, grid thickness to 2, and row padding to 10
- Outline Color: Color after the Header and row group. We are using the default green as the Outline color.
- Outline Weight: Matrix Line width. We changed the line stroke to 4
- Text Size: Font size of table values. Let me change the text size to 9
As you can see from the screenshot below, we enabled the Vertical Grid and assigned some random colors.
- Vert Grid Color: Change the Color of a Matrix Vertical Grid.
- Vert Grid thickness: Matrix Vertical Grid Line width or stroke
We renamed the column names under the values section to adjust the space. As you can see, we changed the Sales Amount names from Sales and Total Product Cost to Cost.
Format Column Headers of a Matrix in Power BI
This section is to alter the Header Colors. As you can see from the screenshot below, we changed the Font color to White and the background color to green. Next, the Font Family to Cambria, Outline to Top + Bottom (Outline added to the top and bottom of a Header), Text Size to 15, and Header text alignment to center.
Format Row Headers of a Matrix in Power BI
This section is used to alter or format the Row Headers section. Here, we changed the Font color to White, the Background color to Red, the Outline to Top + Bottom (Outline added to the top and bottom of each row), the Font Family to Cambria, the Text Size to 15, and the text alignment to center.
As you can see from the above screenshot, though, we changed the Background color of the total rows (Row Headers), and only the Total background color has changed. It is because of the Banded Row Style property that we explain in the next step.
Format Values of a Matrix
You can use this section to change the Power BI Matrix values. As you can see from the screenshot below, we changed the Font colors and Back colors of the even and odd rows.
Banded Row Style: By default, it is set to On. It means the Row Header color will be the same as the remaining Row fields.
Let me set this Off. It changes the Row Header Background Color to Purple. It is because we applied this color in the above step, i.e., the Row Headers section.
Show On Rows: Enabling this option shows the totals on Rows. As you can see, we removed the Outline, Changed the Font to Cambria, and changed the Text size to 13
Format Subtotals of a Matrix in Power BI
Use this subtotal section to alter the text and background color of subtotals. By toggling Row subtotals and column subtotals to Off, you can remove the Totals completely.
Format Grand Total of a Matrix in Power BI
Use this Grand Total section to alter Total’s text and background color. As you can see from the screenshot below, we changed the Totals Font color to white, the Background color to purple, the Font Family to Cambria, and the Text Size to 14.
Apply to labels: By toggling this option to On, apply the Background Color to the Header of the Total. As you can see, Power BI has changed the background color of the text of the header of Total.
Power BI Matrix Field Formatting
Use this section to format individual columns in a Matrix.
For example, you can use this section to assign a completely different color to one column. Here, we are selecting Sales. For the Format Power BI Matrix demo purpose, we only changed the background color to Pink for this column.
Power BI Matrix Conditional Formatting
Use this section to format Metric columns (Numeric) in a Matrix. For example, adding a background color to a complete column, adding data bars, etc. We will write a separate article to explain these settings.
Format Power BI Matrix Title
You can enable the Matrix title by toggling the Matrix option from Off to On. From the screenshot below, you can see we added the Title Text as Sales Vs. Total Product Cost by Product Color and Occupation.
Next, we changed the Font Color to Green, the Font Family to Georgia, the Text Size to 25, and the Title Alignment to center. You can add the background Color to the Matrix title if you want.
Format Power BI Matrix Background Color, and Borders
You can add a Background color to a Matrix by toggling the Background option to On. For the Format Matrix demonstration purpose, we added a sky pale yellow color with 34% transparency.
Similarly, you can add Borders to a Matrix by toggling the Border option from Off to On.