Compare Cols

<< Click to Display Table of Contents >>

Navigation:  Reference > Transforms >

Compare Cols

Description

Creates a new column with a comparison of two other columns.

 

Examples

Compare 2 numerical columns:

 

how to compare 2 numerical columns example

 

Compare 2 date columns:

 

how to compare 2 date columns example

 

Inputs

One.

 

Options

Uncheck automatic new column name to set a name for the newly created column in New column name.

Select the two columns you wish to compare as Column 1 and Column 2 and the Comparison operator.

Check case sensitive to use case sensitive matching for text.

 

Notes

Number, date and text values are treated differently for Equal to, Greater than, Less than, Greater than equal, Less than equal and Not equal to operations.

oIf both values are numeric, a numeric comparison will be carried out. This is accurate to approximately 16 digits of precision.

oIf both values match a supported date formats in Preferences, a date comparison will be carried out.

oOtherwise the values will be treated as text.

oFor example, an empty value is considered less than 0, because they will be compared as text. So you might want to replace empty values with 0 or remove those rows with Filter, before comparing them.

Comparisons of text are whitespace sensitive. You can use Whitespace to remove whitespace before filtering and Replace to get of other unwanted characters (e.g. whitespace inside the text).

The new column is added at the right end. You can change the column order with Reorder Cols and the column name with Rename Cols.

See here for more details on Regular expressions (regex).

 

See also

Split Cols