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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
TotalAnonymous
Helper II
Helper II

Color Formatting (Font Color) not working on Calculation Group - Matrix

Dear Community, 

I hope you're doing well. 

I'm facing an issue regarding applying conditional formatting (Font Color) into Calculation Group (served as column) in Matrix. Please kindly find the link of PBIX below. The data here is a sample. 

As you can see in the image below, the idea is to applying conditional formatting to some of Calculation Item (vs PY%, vs vs P3M%)

TotalAnonymous_0-1739173749338.png

 

Afterward, I'm applying this measure to Conditional Formatting - Font Color menu as follows

TotalAnonymous_1-1739173792051.png

The result is as follows, the color formatting is still not applied. 

TotalAnonymous_2-1739173838868.png
Would you mind to help me how to apply the conditional formatting in this matrix? Thank you in advance

Link: https://drive.google.com/file/d/1WwSxCUlupZROfHZr-r2XJyWncz7Ao7Im/view?usp=sharing

5 REPLIES 5
Anonymous
Not applicable

Hi @TotalAnonymous ,

Based on the information, try to create the measure for vs P3M%, vs P6M%, vs YTD PY%.

vs P3M% = 
CALCULATE(
        [Sales Amount],
        'Time Intelligence'[Time Calc] = "vs P3M%"
    )
vs P3M% Font color = 
IF([vs P3M%] < 0, "red", IF([vs P3M%]> 0, "green", "black"))
vs P6M% = 
CALCULATE(
    [Sales Amount],
    'Time Intelligence'[Time Calc] = "vs P6M%"
    )
vs P6M% Font color = 
IF([vs P6M%] = 0, "black", IF([vs P6M%] > 0, "green", "red"))

vjiewumsft_2-1739868276531.png

vjiewumsft_3-1739868293916.png

 

vjiewumsft_1-1739868251448.png

You can view the following links to learn more information.

Solved: Calculation Group Condiftional Formatting not work... - Microsoft Fabric Community

Solved: Conditional Formatting Matrix with Calculation Gro... - Microsoft Fabric Community

Solved: Conditional Formatting using Calculation Groups no... - Microsoft Fabric Community

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

 

Best Regards,

Wisdom Wu

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

Hi @Anonymous , thanks for your help! I'm sorry for late response...

Based on the screenshot, it seems that the negative value (-100%) is considered as green rather than red. However, please allow me to check the PBIX and get back to you. Thank you!

TotalAnonymous
Helper II
Helper II

Hi @FarhanJeelani , Thanks for your support in advance. It means a lot for me.
I have checked the PBIX, it seems that the measure that has been applied by Color formatting is "P3M". While the measures that I need to color format are "vs P3M%", "vs P6M%", "vs YTD PY%". It seems that in the PBIX file you've attached, those measures are not affected by color formatting. Thank you

TotalAnonymous_0-1739239863477.png

 

FarhanJeelani
Super User
Super User

Hi @TotalAnonymous ,

Please use the attached PBIX. I did the change on DAX.

FarhanJeelani_0-1739188584276.png

 

Hi @FarhanJeelani , thanks for your help! Please allow me to check and get back to you ASAP

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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