Have you ever tried applying conditional formatting to your Power BI Matrix visual? That makes your data more engaging and easier to understand.
You can add background colors, font colors, data bars, icons, or web links to your matrix visualization to highlight the data.
In this tutorial, I will explain how to apply conditional formatting to a matrix visual in Power BI. I have different examples on Matrix visual formatting, such as:
- Format Background color in Power BI Matrix visual
- Format Font Color in Power BI Matrix Visualization
- Applying Data Bars Conditional Formatting to Power BI Matrix
- Power BI Matrix Conditional Formatting with Icons
- Applying Conditional Formatting with Web URL to Power BI Matrix
Have a look at the examples below!
Apply Conditional Formatting to Power BI Matrix [Background Color]
Here, I will show how to apply conditional formatting in the Power BI Matrix visual as a background color.
You can apply conditional formatting to any text or data field, as that field should contain numeric values, color names, hex code values, or web URL values.
I will explain this with an example below:
I have created a matrix visual with the ‘Sales’ data, where the Rows represent ‘Category‘, ‘Product‘, and ‘Store Type‘ fields, and the Values represent the ‘Sales Quantity‘.

I wanted to apply conditional formatting with a background color to the sum of sales values if the values match the conditions below.
- Sum of Sales Quantity >= 5 and less than 10 – Format with ‘Red’ color
- Sum of Sales Quantity > 10 and less than 40 – Format with ‘Blue’ color
- Sum of Sales Quantity >40 and less than 80 – Format with ‘Green’ color
Follow the steps below:
- On the Power BI Desktop, select the matrix visual and open the ‘Visualization‘ pane. Click on the Format icon. Click on the drop-down of ‘Cell elements‘.

- Next, expand the ‘Series‘ option and select the field that you want to format. Here, I was applying the format as a background color, so toggle on the Background color option. Then, click on the fx option to set the conditional formatting.

- Then, the Background color dialog box opens, where you can apply the background color based on the Format style options. See the parameters below:
- Format style: I have selected the Rules option.
- Rules: Enter the values according to your requirement.
Click on the OK button.

- Hereafter, you can see the conditional formatting applied to the Sum of sales quantity column in the screenshot below.

This is how you can apply conditional formatting to a matrix visual in Power BI.
Check out Hide or Remove Column Headers on Power BI Matrix Visual
Conditional Format Font Color in Power BI Matrix Visualization
This example demonstrates how to format the font color in a Power BI matrix table by applying conditional formatting.
I have created a matrix visual as shown in the image below. Within the matrix table, I wanted to format the font color so that if the status is ‘Profit‘, the text should be in ‘Green‘. If the status is ‘Loss‘, the text should be in ‘Red‘.

Here are the steps to follow:
- Select the Matrix visual -> Go to ‘Visualization’ pane and click on Format visual icon, expand the ‘Cell elements‘. Then, select ‘Status’ in the series option. Toggle on the Font color button.

- On the Font color window, select the Format style as ‘Rules‘ and Apply to Values and totals option along with the below provided rules.
- If the value is Profit -> Green
- If the value is Loss -> Red
Then, click the Ok button.

The changes will be applied, formatting the text color based on the status value.
Output:

This is how to format the matrix visual with font color using conditional formatting in Power BI.
Apply Data Bars Conditional Formatting in Power BI Matrix Visual
Let me show you how to apply data bars within the matrix visual in Power BI.
The matrix visual presented below shows the ‘Sales Quantity‘ values. I wanted to format these values as data bars by applying conditional formatting to them.

Data bars provide a visual representation of values directly within the Matrix table, which makes it easy to compare. The length of the bar corresponds to the value present in the matrix table.
Go through the steps to add data bars to the Power BI matrix visual:
- On the Report canvas of Power BI desktop, select the Matrix visual -> Go to ‘Visualization’ pane and click on Format visual icon, expand the ‘Cell elements‘. Then, select ‘Sales Quantity‘ in the series option. Toggle on the Data bars button. Click on the fx option.

- On the Data bars window, you can set the Minimum and Maximum values for a bar by selecting the Lowest and Highest values—the length of the bars will depend on the values provided. We can also set different colors for positive bars and negative bars.
- Positive bar: Pick a suitable color from the drop-down.
- Negative bar: Select a color from the drop-down menu.
Then, click the OK button.

- Then the data bars will be populated on the Power matrix visual. Have a look at the reference image.

You can also display only the data bars without any values by selecting the “Show bar only” checkbox at the bottom. By default, it will be unchecked.

Output: Databars without values

This way, you can apply conditional formatting to the Power BI matrix visual by using data bars.
Power BI Matrix: Apply Conditional Formatting with Icons
Now, let’s see how to apply icon formatting to the matrix visual in Power BI.
I have a Matrix visual with ‘Sum of Sales 2024‘ that displays the values, as shown in the image below.

Now, I wanted to apply formatting as icons based on the values corresponding to the ‘Status’ value.
- If Status is Profit -> Green Arrow Icon showing upwards
- f Status is Loss -> Red Arrow Icon showing downwards
Follow the same steps as those given in the previous examples, but modify only the formatting styles.
See the steps:
- Expand the ‘Cell elements’ of the Format pane. Then, select ‘Sum of sales 2024‘ in the series option. Toggle on the Icons button.

- Then, the icons will be added by default based on the value in the selected column.

If you want, you can also change the icon format by selecting the custom icons from the Icons window. Click on the fx option.
- Then, the icon window box opens. Select ‘Format style’ as ‘Rules‘ and ‘What field should we base this on?’ to ‘First Status‘, because I’m formatting based on the status value. Provide the Rules as shown in the image below and select icon styles. Then, click on OK.
We can set up 25 different pairs of icons.

- The icons will be added based on the value in the ‘Status’ column. Have a look at the image below.

This way, you can add icons to the matrix visual in Power BI.
Power BI Matrix: Apply Conditional Formatting with Web URL
This example demonstrates how to apply web URL conditional formatting in the Power BI matrix visual.
To do this, I created a Power BI matrix visual, as shown in the image below, which includes ‘Website‘ and ‘Country‘ columns.

Now, I wanted to apply a website URL to a Country value in the Matrix visual so that I can make the link clickable.
See the steps below:
- On the Power BI Desktop report canvas, select the Matrix visual -> expand the ‘Cell elements’. Then, select ‘Country‘ in the series option. Toggle on the ‘Web URL‘ button. Then, click on the fx option.

- Then, the Web URL window box opens. Then, select What field should we base this on? Option to ‘Website‘ column where your URL is present.

- After that, you can see that the Country values will be displayed with the clickable links. Hover the mouse over a value in the Country column. Reference the image below.

Following the above method, you add a URL to the matrix visual using the web URL conditional formatting.
I hope you have learnt how to apply conditional formatting to your Power BI matrix visual. This is also applicable to the Power BI table.
If you have any questions or suggestions regarding this, please mention them in the comment section below.
You may like the following Power BI visual tutorials:
- Power BI Column Chart
- Power BI Gauge Chart
- Create a Clustered Bar Chart in Power BI
- Power BI Slicer | Sync Slicers in Power BI

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.