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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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":
and this is where the problem occurs. Some of the "Status" fields are formatted correctly, some aren't:
and there seems to be no pattern.
I wonder if it's something to do with the "Sum" element of the conditional format:
but, if it isn't, I have no other ideas.
Solved! Go to Solution.
@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/...
@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/...