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 August 31st. Request your voucher.

Reply
Kinley1
Frequent Visitor

automated conditional formatting

Hi there,

 

Can anyone help me with this.

 

I have daily transaction amount in table1 for client food and total budget for client food in table2. I want to apply a dynamic conditional formating in my guage chart with different colors based on sum of the transaction amount against their budget. For example if the sum of the transaction is less than 50% of the total budget then the color is green but if it is greater than 50% the color changes to red. 

Kinley1_0-1688349974620.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Kinley1 , You can create a measure

A% = divide (sum(Table[Actual]), Sum(Budget[Budget]))

 

Now you can use field or rule based conditional formatting

 

for field value base conditional formatting use the following measure in conditional formatting

Switch ( True(),

[A%] <.5 , "Red",

[A%] <.75, "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/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

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
Kinley1
Frequent Visitor

@amitchandak Thank you for the prompt response/help, will try definitly try this:-)

amitchandak
Super User
Super User

@Kinley1 , You can create a measure

A% = divide (sum(Table[Actual]), Sum(Budget[Budget]))

 

Now you can use field or rule based conditional formatting

 

for field value base conditional formatting use the following measure in conditional formatting

Switch ( True(),

[A%] <.5 , "Red",

[A%] <.75, "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/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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