Forum Discussion
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.
What can I do to troubleshoot this? How should I change the expression to get 1= green?
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.
2 Replies
- GeraldGEmerickSuper User
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.
- tayloramySuper User
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.