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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
bm_data
Frequent Visitor

Conditional formatting cards based upon calculated values

I am creating a corporate metrics score card and need help with conditional formatting. I am using cards for all my values since I am combining so many sources in this one report, a table cannot be used. I am coloring the background green where goals are being met and red where they are not. 

 

I have a list of metrics (text box), current monthly total (card), monthly goal (text box), YTD goal (card) and YTD total (card). The conditional formatting works great on the monthly goal because the value is always based on the same goal.

 

example:

Metric     Month     Current Month     Month Goal     YTD Goal     YTD

Sales       March      3                           5                      15                13

 

In this example there are "3" sales in March with a goal of "5" per month. With March being the 3rd month YTD goal is "15". I can get all my calculations correct but what I need is to color the "13" card background green or red based upon the YTD goal "15".  The only way I can see this working would be if I change the values each month, however I have this working with a slicer so that is not a viable option. 

1 ACCEPTED SOLUTION
speedramps
Super User
Super User

Create this measure with your measure names

 

YTD RAG =

IF([YTD measure] >=   [YTD Goal measure],"green","red")

 

TheN click on the YTD card / Format / General / Effects / BackgrouNd on / BackgrouNd Colour fx / Format style = Field value/ What field should this be based on = YTD RAG 

 

 

Thanks for reaching out for help.

I have helped you, now please help me by giving kudos.

Remeber we are unpaid volunteers.

Click the thumbs up and accept as solution button. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !

View solution in original post

2 REPLIES 2
bm_data
Frequent Visitor

@speedramps Thank you for the reply, this is exactly what I was looking for.

speedramps
Super User
Super User

Create this measure with your measure names

 

YTD RAG =

IF([YTD measure] >=   [YTD Goal measure],"green","red")

 

TheN click on the YTD card / Format / General / Effects / BackgrouNd on / BackgrouNd Colour fx / Format style = Field value/ What field should this be based on = YTD RAG 

 

 

Thanks for reaching out for help.

I have helped you, now please help me by giving kudos.

Remeber we are unpaid volunteers.

Click the thumbs up and accept as solution button. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.