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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Conditional Formatting - Font Color should be changed based on Values in comparison with Total

Hi Communtity, 

 

I have a requirement to add a conditional formatting for one of Cross tabs Column . The font color of the below shown column should changes as per the rules .

 

  • Red = Percentage < 90%
  • Green = Percentage is >=90% and >=Overall %
  • Gold = Percentage is >= 90% and <Overall %

Overall in nothing but the Total % at the bottom of the screenshot . We need to compare each and every value that we have in rows with Overall and then assign a color . 

Capture.JPG

 

Please assist if there is a way to acheive the same. 

 

Thanks,

G Venkatesh

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Assume you have a % column ( and it is between 0 to 1, marked as % to display 0 to 100)

 

Measure =

var _1 = [Percentage]

var _2 = calculate([Percentage], allselected())

return

Switch(True() ,

_1 < .9 , "Red" ,

_1 >.9 && _1>= _2 , "Green" ,

_1 >.9 && _1< _2 , "Gold"

)

 

Use this in conditional formatting using the field value option

How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4

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
amitchandak
Super User
Super User

@Anonymous , Assume you have a % column ( and it is between 0 to 1, marked as % to display 0 to 100)

 

Measure =

var _1 = [Percentage]

var _2 = calculate([Percentage], allselected())

return

Switch(True() ,

_1 < .9 , "Red" ,

_1 >.9 && _1>= _2 , "Green" ,

_1 >.9 && _1< _2 , "Gold"

)

 

Use this in conditional formatting using the field value option

How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4

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
Anonymous
Not applicable

Thanks @amitchandak  , This helped to resolve the issue . 

 

G Venkatesh

Helpful resources

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