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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Color code Card / KPI

Good Morning and Happy Holidays!

 

For a Plan to Actual KPI, I am using a Card with a measure in it 

aPlantoActual = Format((([YTD Sales Actual SS]-[YTD Sales Plan SS])/[YTD Sales Plan SS]), "Percent")
 
If the result is positive, I would like to show the numbers in green; if negative, then in Red.  
 
I tried formatting in the Data Label and selecting color and then fx.  I select rules.
It does not let me select aPlantoActual - it is grayed out.  
 
Please suggest how to do this.
 
Thanks,
 
Pavan
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a measure like and use it in conditional formatting using field value option

 

color =

var _1 = divide([YTD Sales Actual SS]-[YTD Sales Plan SS]), [YTD Sales Plan SS])

return

if(_1 >=0,"Green", "Red")

 

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Create a measure like and use it in conditional formatting using field value option

 

color =

var _1 = divide([YTD Sales Actual SS]-[YTD Sales Plan SS]), [YTD Sales Plan SS])

return

if(_1 >=0,"Green", "Red")

 

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Excellent!

Happy Holidays and Best Wishes for the New Year!

Pavan

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.