If

<< Click to Display Table of Contents >>

Navigation:  Reference > Transforms >

If

Description

Sets the value of a new column based conditionally on values in one or more other columns.

 

Inputs

One.

 

Options

Click the '+IF' button to add a new IF/ELSE IF..THEN condition.

Click the '+AND' button to add an AND to the selected IF/ELSE IF..THEN.

Click the 'x' button to delete the selected IF/ELSE IF..THEN/AND.

The Logic column shows the type of row.

Set Column to the column you wish to match.

Set Op. to the comparison operator.

Set Value to the value you wish to compare.

 

Notes

You can simulate OR with multiple IF statements. For example:

 

 IF x = 1 OR y = 2 

    THEN 3

 

  Is equivalent to:

 

 IF x = 1

    THEN 3

 ELSE IF y = 2

    THEN 3

 

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. Any values that can be converted to a number will be treated as a number. Any values that match the supported date formats in Preferences will be treated as a date.

All values are treated as text for Contains, Starts with, Ends with, Matches regex, Is not, Doesn't start with, Doesn't end with and Doesn't match regex operations.

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

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

 

See also

Lookup