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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ArmellA
Frequent Visitor

Conditionnal formatting based on segment and table value

HI, 

Beginner here. I have this model, and want a conditionnal formatting in a matrix that looks like this. 

So depending on the "profile" value in the segment, I want the conditionnal formatting to change depending on the value of the corresponding mandatory and validity in Dim_Course. RED = undone (mandatory course) or expired (validity in days). 

 

ArmellA_0-1646081282935.png

 

 

Any clue ?  I'm lost.. 

Thanks 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @ArmellA 

 

You can try the following methods.

Measure = 
IF (
    MAX ( Dim_Profile[Mandatory] ) = "yes"
        && DATEDIFF ( SELECTEDVALUE ( Fact_Completion[DateCompleted] ), TODAY (), DAY ) > 365,
    "Red"
)

Set Measure to the background color of the table font.

vzhangti_0-1646277819818.pngvzhangti_1-1646277837783.png

Is this the output you expect?

vzhangti_2-1646277928533.png

 

Best Regards,

Community Support Team _Charlotte

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

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @ArmellA 

 

You can try the following methods.

Measure = 
IF (
    MAX ( Dim_Profile[Mandatory] ) = "yes"
        && DATEDIFF ( SELECTEDVALUE ( Fact_Completion[DateCompleted] ), TODAY (), DAY ) > 365,
    "Red"
)

Set Measure to the background color of the table font.

vzhangti_0-1646277819818.pngvzhangti_1-1646277837783.png

Is this the output you expect?

vzhangti_2-1646277928533.png

 

Best Regards,

Community Support Team _Charlotte

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

amitchandak
Super User
Super User

@ArmellA , Not very clear but measure based conditional formatting can help

How to do conditional formatting by measure and apply it on pie? : https://youtu.be/RqBb5eBf_I4

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.