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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors