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
ArchStanton
Impactful Individual
Impactful Individual

Conditional Formatting Rule doing the opposite of what it should

I have a conditional formatting rule that does the opposite of what the rule is, when its below 20%the Border of the Card should be Green otherwise it should be Red. I've had to reverse it to work which is counter-intuitive. The value is based on the green 19.7% figure in the Card which works correctly which is making this a bizarre issue to say the least!

Can anyone make sense why this is happening?

 

ArchStanton_2-1764326918537.png

 

 

ArchStanton_0-1764325820994.png

 

 

 

1 ACCEPTED SOLUTION
ArchStanton
Impactful Individual
Impactful Individual

Thanks to everyone who has replied to this and offered me help!

I just found a manual filter was on the Border, when I removed it the card border behaved correctly (Green <20% RED>20%.

😊

View solution in original post

5 REPLIES 5
ArchStanton
Impactful Individual
Impactful Individual

Thanks to everyone who has replied to this and offered me help!

I just found a manual filter was on the Border, when I removed it the card border behaved correctly (Green <20% RED>20%.

😊

Praful_Potphode
Impactful Individual
Impactful Individual

Hi @ArchStanton 

 

Check you DAX output by chnaging the format from percentage to decimal number.whatever number comesup thers is what you can use here(0.197,0.0197,1.97).

you might have to also add <= in first rule or >= in seocond rule, otherwise it will miss some values.

 

Please give kudos or mark it as solution once confirmed.

 

Thanks and Regards,

Praful

rohit1991
Super User
Super User

Hii @ArchStanton 

 

Your measure is returning a decimal value (0.197), but your conditional formatting rule is written as if the measure returns a percentage (19.7). Power BI always uses the raw value for conditional formatting, not the formatted percentage shown in the card.

To fix the issue:

  1. Check your measure – it likely returns something like:

    % Cases = DIVIDE([OlderCases], [TotalCases])

    This returns 0–1, not 0–100.

  2. Update your rule to use 0.20 instead of 20%

    • For green: Min = 0, Max = 0.20

    • For red: Min = 0.20, Max = 1

Once the rule uses the decimal values, the card border will match the card text correctly and the colours will no longer appear reversed.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Hi, that already is my rule and it seems to be working just fine in Desktop but not in the published version:

ArchStanton_0-1764329934104.png

 

amitchandak
Super User
Super User

@ArchStanton , the first color should be green and the second should be red to match with number on card. 

I saw the other post too, mean rulesare  working correctly on the outline. Can you share pbix to check 

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors