IF Function

The IF function allows for conditional logic to determine if a calculation will execute based on the criteria in the statement. The IF function provides for a single line if-then-else statement. However, the statement can be nested to capture multiple IF conditions.

 

Command Syntax:

IF(<condition>,<execute action where TRUE>,<execute action where FALSE>)

IF(<condition>,IF(<condition>,<execute action where TRUE>,<execute action where FALSE>),<execute action where FALSE>)

 

EXAMPLE:

This IF function sets a line to return a value if the parameter is greater than one hundred. Otherwise, zero will display.

IF([4109]>100,[4109],0)

 

Line Definition

 

EXAMPLE:

This IF function formula sets a line to return different values if the parameter is greater zero but less than 4000. If the value is greater than 4000 then a value of 5000 will return on the report; if the value is less than 4000 then the value of the parameter will be returned.

IF([1309] >0,IF([1309]>4000,5000,[1309]),[1309])

 

Note: Multiple IF functions are used within the above statement.

 

Line Definition

 

Report Output