# Logic Filters

Logic filters can bend the rules to tolerate differences based on arithmetical or % difference. The only prerequisite to use the "Logic Filters" is to activate the setting "auto cast text to number", this will allow the comparison engine to trigger the logic filters when it detects there is a difference between two numerical values.

Numerical differences are a simple arithmetical difference between values for a column in Source A VS Source B and takes the tolerance limit to flag if the difference is within the tolerance range, for example:

Case 1: Value 5 (Source A) and value 4 (Source B) = 1
Case 2: Value 4 (Source A) and value 5 (Source B) = -1

% Difference works in the same way as Numerical Difference but takes the % difference respect to the value in Source A

There are 4 simple rules for creating logic filters:

1) You can create as many filters as you want but there can be only 1 active filter per column.

2) The tolerance is an inclusive threshold (e.g. if the tolerance is set to the value 1, that means "tolerate any difference as long as that difference is less or equal to 1").

3) ABS will get the absolute value to the difference, for instance, if for a given column you set a numerical tolerance of 1, then in source A you have the value 5 and in source B you have 7, then 5-6 = -2, by choosing activating the absolute value function (ABS) then the difference instead of -2 (negative) would be 2 (positive), which would turn this as a difference.

4) Any filter with no column assignation or a value in "tolerance limit" will automatically be eliminated when you save.

What happens if a filter set on a column that doesn't always have numbers?
Nothing, the filter logic is triggered only when comparison engine detects a difference between two numerical values.

What happens if in Source A the value is zero and the filter is set to "% difference"?
Any difference while the Source A has a value of 0 the % difference is defaulted to 100% regardless of what the value is in Source B.