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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
AndrewPF
Helper V
Helper V

conditional formatting not working for every row in a table

I have a text field called "Status" and I have created a numeric "Status Numeric" as follows:

 

if [status] = "Not Started" then 1 else if [status] = "Past Due" then 1 else if [status] = "In Progress" then 2 else if [status] = "Passed" then 3 else 0, Int64.Type

 

Because it is not possible to apply conditional formatting to a text field (or is it?), I have applied it based on the value of "Status Numeric":

 

AndrewPF_0-1658756697929.png

 

and this is where the problem occurs. Some of the "Status" fields are formatted correctly, some aren't: 

 

AndrewPF_2-1658756821814.png

 

and there seems to be no pattern. 

 

I wonder if it's something to do with the "Sum" element of the conditional format: 

 

AndrewPF_3-1658756875006.png

 

 

but, if it isn't, I have no other ideas. 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AndrewPF , You write a color measure and use that in conditional formaating

 

Switch(True() ,

[status] in {"Not Started", "Past Due"}  , "Red" ,

[status] in {"In Progress"} , "Yellow",

"Green"

)

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...

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

1 REPLY 1
amitchandak
Super User
Super User

@AndrewPF , You write a color measure and use that in conditional formaating

 

Switch(True() ,

[status] in {"Not Started", "Past Due"}  , "Red" ,

[status] in {"In Progress"} , "Yellow",

"Green"

)

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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 Solution Authors
Top Kudoed Authors