💬How to write an IF Statement in Cascade
Writing IF statements in Cascade made easy
Last updated
Writing IF statements in Cascade made easy
Last updated
If you’re familiar with generic Excel IF statement Syntax, then you’ll have no problem getting accustomed to writing IF statements in Cascade.
Firstly, you need a tool with an Expression Editor in order to write an IF statement. Generally speaking, you will use either a Filter tool or an Edit Columns tool; these each have an Expression Editor.
Here is the syntax for an IF statement in Cascade:
The condition
is a boolean expression to test (e.g., whether or not some statement is true).
The then
is the true variable.
The else
is the false variable.
So for example, if I wanted to create an IF statement that will append green apples the value ‘verte’ and red apples the value ‘rouge’, my formula might look something like this:
My IF statement will look for the value “green” in the [apple]
column. If the value in the [apple]
column of a particular row is “green”, then the value ‘verte’ would be attributed to that row. If the value is not “green” (e.g., it can be any other value, and we are hoping the only color we might see is red), then the value ‘rouge’ would be attributed to that row.
IF statements can appear somewhat complex when nesting many conditions and operands. However, there are other Functions available to make writing complex IF statements with multiple conditions.