How to: If two columns match AND two more columns don't... I want a result

I hope you can help me with the following problem.

I’ve 4 columns that I want to compare with each other:
Col1 = Col2 AND Col3 <> Col 4 => “Result”
In words, if the value of a row in column 1 and column 2 are the same AND the value in columns 3 and 4 are not the same, then column 5 should say “Change”.

I’ve tried “Rule Engine” in different ways, but I’m not getting the right result.
My last try:
$Col_1$ = $Col_2$ AND NOT $Col_3$ = $Col_4$ => “Changes”

Please help me out :slight_smile:

HI @AniMcClane

Maybe you could add parenthesis as follows

($Col_1$ = $Col_2$) AND NOT ($Col_3$ = $Col_4$) => “Changes”

“NOT” is not a function but an unary operator so there should be an space between “NOT” and “(” for that to work.

Another hint and question: What are your column types ? Are they double ? If so, be aware that a “=” operator may not give the expected results because of tiny decimal differences between double numbers.

Maybe this can help.

Best wishes



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.