IF

Returns one value if a condition is true and another if false.

Updated over a week ago

Description

IF() evaluates a condition and returns a specified value if the condition is true and another value if false. It's akin to a logical decision-making tool within your dataset.

Syntax

IF(condition, value when true, value when false)

Output

text

Variables

  1. condition: The logical condition to evaluate.

  2. value when true: Value returned if the condition is true.

  3. value when false: Value returned if the condition is false.

Example

IF(`Profit`>0, “Good”, “Bad”)

Investment

Profit

IF

Investment A

$500

Good

Investment B

-$200

Bad

Investment C

$1200

Good

Did this answer your question?