OR

An OR statement returns TRUE if at least one of the conditions is TRUE and returns FALSE when all the conditions evaluate to FALSE.

Syntax

OR(logical_test1, ...logical_test2?)

Arguments

Arguments
Datatype
Descriptions

logical_test1

Node reference,Number

The first condition to be evaluated. This is a required argument.

logical_test2?

Node reference,Number

The additional conditions to be evaluated. These are optional arguments.

Return Value

Either True or False values that are given in the arguments.

Remarks

OR function accepts multiple conditions.

Example

Consider the below scenario in which if the Sales Quantity is greater than 50 or the usage Customer Ranking is 1, the price should be $20 else $25.

Periods
Jan
Feb
Mar
Apr
May
Jun

Sales Quantity

50

55

45

65

25

31

Customer Ranking

1

1

2

2

1

2

To achieve this, the following formula should be written in the [Price] node:

IF(OR([Sales Quantity]>50,[Customer Ranking]==1),20,25)

Result

Parameter
Jan
Feb
Mar
Apr
May
Jun

Price

20

20

25

20

20

25

As you can see from the above table, the result will be 20 even if one of the conditions is true and it will be 25 only when both of the conditions are false. In Feb, both of the conditions are True & in Jan, Apr and May one of the conditions is true. So the result is 20. But in Mar both the conditions are false, so the result is 25.

Last updated