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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.