Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
PS_78
Helper II
Helper II

Conditional Formatting for a field in Column based on it's value in Matrix Visual

Hello Team - I have a matrix visual in my report with "Year and Period" on Rows, "Close Days" in Columns and "Count" on Values. I would like to do a background color for a column based on "Close Days" value. If "Close Days" is greater than D5, I would like to color it with a different color. Also I would like to differentiate the values before D6 and after D5 with a line as shown in below screen shot. Please let me know if it's possible.

 

PS_78_0-1718900187937.png

 

Thanks,

Phani

1 ACCEPTED SOLUTION
v-yilong-msft
Community Support
Community Support

Hi @PS_78 ,

I create a table as you mentioned.

vyilongmsft_0-1718934611831.png

Then I use the matrix visual.

vyilongmsft_1-1718934686804.png

I think you can create a measure and here is the DAX code.

Measure = IF(MAX('Table'[Number])>43,"Red",BLANK())

Then you can use Conditional formatting.

vyilongmsft_2-1718934836170.png

vyilongmsft_3-1718934909438.png

Finally you can get the Background color. While Power BI does not directly support adding lines within a matrix to differentiate values.

vyilongmsft_4-1718935183397.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yilong-msft
Community Support
Community Support

Hi @PS_78 ,

I create a table as you mentioned.

vyilongmsft_0-1718934611831.png

Then I use the matrix visual.

vyilongmsft_1-1718934686804.png

I think you can create a measure and here is the DAX code.

Measure = IF(MAX('Table'[Number])>43,"Red",BLANK())

Then you can use Conditional formatting.

vyilongmsft_2-1718934836170.png

vyilongmsft_3-1718934909438.png

Finally you can get the Background color. While Power BI does not directly support adding lines within a matrix to differentiate values.

vyilongmsft_4-1718935183397.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-yilong-msft - Thanks for your quick help. I was overthinking that I should do conditional formatting on "Columns". I tried this and it did work like a charm. However, I would like to color the complete column where Number > 43 irrespective of whether it has values or not. Is it possible?

Thanks,

Phani

Hi @PS_78 ,

If there are values in the table, and if they are 0, it can achieve the whole column in the red color you need.

vyilongmsft_0-1719386271349.png

However, in the case of a displayed Blank, there is currently no function to display the blank value in the matrix as the same color for the entire column.

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.