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

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

Reply
cottrera
Post Prodigy
Post Prodigy

Dynamic conditional formatting

Hi I have a a performance report.

 

The facts table contains the following columns - Date, Team, SLA (Pass or Fail) the model contains a dates table with the following collumns - Date, Year , Month.  I also have a DAX measure % SLA pass

 

My report has a table visual that displays Month and my DAX measure

MonthSLA Pass (DAX measure)
Jan100.00%
Feb33.33%
Mar75.00%
Apr57.14%

 

The report page has slicers Year and Month

Year Month
2022 March

 

My visual table has conditional formating set to colour the SLA Pass (DAX measure) colours based on the criteria I have set.

However we have just changed the threshold from 01/04/2022.

 

Is it possible to Dynamically set the conditional formatig colours for results before 01/04/2022 and then have a different set of colours for results after 01/04/2022? Like the example shown below.

 

Conditional format  < 01/04/2022

% SLA 100% = Green  

% SLA >=75% = Amber  

% SLA <75% = Red  

 

Conditional format  > 01/04/2022

 

% SLA 100% = Green  

% SLA >=50% = Amber  

% SLA <50% = Red  

 

thank you

 

Richard

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@cottrera , You can create a color measure and use that in conditional formatting using field value option

 

Color Date = if(FIRSTNONBLANK('Date'[Date],TODAY()) < date(2022,04,10) ,
Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .75 , "Amber" ,
"Red "
) ,
Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"Red "
)
)

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L

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

View solution in original post

2 REPLIES 2
cottrera
Post Prodigy
Post Prodigy

Hi  thank you for your quick response your DAX function works fine 😊

amitchandak
Super User
Super User

@cottrera , You can create a color measure and use that in conditional formatting using field value option

 

Color Date = if(FIRSTNONBLANK('Date'[Date],TODAY()) < date(2022,04,10) ,
Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .75 , "Amber" ,
"Red "
) ,
Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"Red "
)
)

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L

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
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.

Top Kudoed Authors