I am trying to contruct a switch or IIf statement compare values in two fields to higlight cells on a report to eith White, Red or Yellow.
The part I has the issue is if field FieldA is within +-10 of the Target field, to make the cell yellow. I have also tried using the field option but it's not working.
=IIF(Fields!FieldA.Value = 0.00, "White",
IIF(Fields!FieldA.Value < Fields!Target.Value, "Red",
IIF(Fields!FieldA.Value > Fields!Target.Value, "White",
IIF(Fields!FieldA.Value - Fields!Target.Value <= 10 And Fields!FieldA.Value - Fields!Target.Value > 0, "Yellow",
IIF(Fields!Target.Value - Fields!FieldA.Value <= 10 And Fields!Target.Value - Fields!FieldA.Value > 0, "Yellow", "White" )))) )
Thanks so much for your help
The part I has the issue is if field FieldA is within +-10 of the Target field, to make the cell yellow. I have also tried using the field option but it's not working.
=IIF(Fields!FieldA.Value = 0.00, "White",
IIF(Fields!FieldA.Value < Fields!Target.Value, "Red",
IIF(Fields!FieldA.Value > Fields!Target.Value, "White",
IIF(Fields!FieldA.Value - Fields!Target.Value <= 10 And Fields!FieldA.Value - Fields!Target.Value > 0, "Yellow",
IIF(Fields!Target.Value - Fields!FieldA.Value <= 10 And Fields!Target.Value - Fields!FieldA.Value > 0, "Yellow", "White" )))) )
Thanks so much for your help