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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.