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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
ngct1112
Post Patron
Post Patron

Dynamic Color Formatting

May I write ONE dax to do the Conditional Formatting applying to Columns A,B,C like that 

 

Color_DAX =
var _Darkgreen = " #34A853"
Return
if(Table[A] = 5, _Darkgreen)

 

Table

ABC
153
5584
1225
541

 

I may need a DAX rather than using Rules in Conditional Formatting.

 

Appreciated if any helps

1 ACCEPTED SOLUTION

@ngct1112 , as long as conditional is needed column A or combination column A, b, and C you can use that for any values /columns.

 

If you need pass measure to condition check for calculation groups

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

4 REPLIES 4
amitchandak
Super User
Super User

@ngct1112 , better to create this on a measure like and use in conditional formatting with field value option

 

Color_DAX =
var _Darkgreen = " #34A853"
Return
Switch(true(),
sum(Table[A]) = 5, _Darkgreen
sum(Table[A]) = 3, "#FF0000"
"#00ff00"

)

 

refer for steps

https://www.youtube.com/watch?v=RqBb5eBf_I4

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

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

@amitchandak , thanks but could I also apply this DAX to columns B & C as well without modifying?

What I am hoping is this DAX can cover all colums A,B,C rather than create 3 different DAX.

 

Great thanks.

@ngct1112 , as long as conditional is needed column A or combination column A, b, and C you can use that for any values /columns.

 

If you need pass measure to condition check for calculation groups

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

@amitchandak , sorry, I may not explain my question very well and I will open an new topic to make it clear.

However, thanks for your answer and it helps a lot

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors