I am comparing 2 similar tables from different data warehouses and writing a report to highlight the discrepancies based on the differences. I would like to highlight the column values of the 2 fields if they are different. So, I am trying to write the Fill COLOR Expression which can change the color based on the value in the column.
I have tried writing some expressions.
Below are the examples:
I tried :
=IIF(Fields!DB1.Value=”NULL”,”Red” ,”White”) Or IIF(Fields!Db2.Value=”NULL”,”Red” ,”White”) Or IIF(Fields!DB1.Value=Fields!DB2.Value,"NO Color","Red")
--Not Working
=IIF(Fields!DB1_Number.Value<>Fields!DB2_Number.Value,"NO Color","Red")
-- Not Handling NULL
There are no error. It is just that the code is not behaving as per the intention.
OR
statements outside theIIf
functions which means you are just comparing strings and the result would be a boolean, not a color. You'd want to put all the conditions inside oneIIf
statement. – StevenWhite