IF( )
Returns one value if a specified condition evaluates to true, or another value if the condition evaluates to false.
Syntax
IF(c, vt, vf)
Arguments
c
The condition to test.
vt
The value to return if the condition evaluates to true.
vf
The value to return if the condition evaluates to false.
Returns
Returns the vt value if c is TRUE or the vf value if c is false.
Example
The following example calculates and displays different discount amounts based on the value in the Total field. If the Total value is greater than 5000, the discount is 15%. Otherwise, the discount is 10%.
IF([Total]>5000, [Total]*15%, [Total]*10%)
The following example uses IF( ) in conjunction with the BETWEEN( ) and ADD_DAY( ) functions to calculate a shipment date. If an orderDate value is in December 2010 (between 12/1/10 and 12/31/10), add five days to the orderDate value. If an orderDate value is in a month other than December, add three days to the orderDate value.
IF(BETWEEN([orderDate], "12/1/10", "12/31/10"), ADD_DAY([orderDate], 5), ADD_DAY([orderDate], 3))
The following example checks each value in the Office field. If the value is Boston, San Francisco, or NYC, display U.S. If the value is something other than Boston, San Francisco, or NYC, display Europe and Asia Pacific.
IF([Office]="Boston" OR [Office]="San Francisco" OR [Office]="NYC", "U.S.", "Europe and Asia Pacific")

Additional Links:

Copyright Actuate Corporation 2012