Hi,
I want to create a column to check if the "Value" columns are the same. I cannot just subtract them as I have nulls in some columns.
How can I do th is?
Solved! Go to Solution.
What abouit replacing Nulls with zeros? You can do this with the Imputation Tool or Multi-Field Tool with expression,
if isnull([_CurrentField_]) then 0 else [_CurrentField_] endif
You probably don't want to subtract the numbers and check the result is equal to zero, as floating point arithmetic may leave some remainder, even if the numbers are essentially the same. You're better off using,
compareepsilon([Field1], [Field2], 0.01)
Where, in this case, 0.01 is the tolerance. If [Field1] and [Field2] are within this tolerance you will get True, else False.
If you want to subtract them, you can use a Data Cleansing tool to replace null with 0
is there a way to 4 way compare? Ive converted nulls to 0.
I don't think so. You're looking at something like,
([Field1] = [Field2]) and
([Field2] = [Field3]) and
([Field3] = [Field4])
...or the equivalent using the CompareEpsilon() function