Reputation: 3
I've got a report that groups on Income, Non Payroll Expenditure and Payroll. Within each group there are separate rows for different categories.
I'd like to have a conditional formatting where if the YTD Variance column total <0, then its red, and if its >0 its green. I've tried numerous methods (Iif and Switch) but cannot get it to work.
This is the current expression I've got on background color.
=IIf(Fields!YTD_Variance.Value<0,"#fd6969","#54b322")
As can be seen in the image its not working correctly. Both of The YTD Variance totals should be red.
Upvotes: 0
Views: 617
Reputation: 21738
Assuming the total is an aggregate, something like =SUM(Fields!TYD_Variance.Value)
then this is what you need to be evaluating.
Change your expression so that is compares the summed value, so something like this...
=IIf(SUM(Fields!YTD_Variance.Value) < 0, "#fd6969", "#54b322")
Upvotes: 1