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

View all the Fabric Data Days sessions on demand. View schedule

Reply
arca123
Advocate I
Advocate I

PowerBI Report Builder background color expression incorrect result

In Report Builder I have a column that displays percentage. If percentage is less than 100%, I want it to be displayed red, if it's 100% or more - I want it to be displayed green.

I have written this simple expression:

=IIf((Sum(Fields!Sales.Value) / First(Fields!DaysValue)) /(Sum(Fields!Budget.Value) / First(Fields!Days.Value)) < 1,"#E6A5A1", "#A8D5BA")

Fields!Days.Value is always constant, so it shouldn't be breaking the expression.

The expression works as intended, except for when the division is exactly 1. 

image.png

What can I do to troubleshoot this? How should I change the expression to get 1= green?

1 ACCEPTED SOLUTION
GeraldGEmerick
Solution Sage
Solution Sage

@arca123 Well, you don't have <= 1 so not sure it is truly 1, maybe it is .99999 and rounding up? Perhaps try < .999 and see if that fixes it.

View solution in original post

2 REPLIES 2
tayloramy
Community Champion
Community Champion

I agree with @GeraldGEmerick, this appears at first glance to be a rounding error. 

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution. 

GeraldGEmerick
Solution Sage
Solution Sage

@arca123 Well, you don't have <= 1 so not sure it is truly 1, maybe it is .99999 and rounding up? Perhaps try < .999 and see if that fixes it.

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.