Calculation Operators
Essbase calculation operators (mathematical, conditional and logical, and cross-dimensional) help you define equations for member formulas and calc scripts.
-
Mathematical Operators are for common arithmetic operations.
-
Conditional and Logical Operators are for building conditional tests.
-
The Cross-Dimensional Operator is for referencing data intersections.
Mathematical Operators
Mathematical operators help you perform common arithmetic operations in your Essbase calculation scripts.
Table 3-1 Mathematical Operators
| Operator | Description |
|---|---|
| + | Adds |
| - | Subtracts |
| * | Multiplies |
| / | Divides |
| % |
Evaluates percentage, for example: Member1%Member2 evaluates Member1 as a percentage of Member2. |
| ( ) | Controls the order of calculations and nests equations and formulas |
Conditional and Logical Operators
Conditional operators in Essbase calculations help you build logical conditions into your calculation scripts.
Table 3-2 Conditional and Logical Operators
| Operator | Description |
|---|---|
| IF | ELSE | ELSEIF | ENDIF | Tests conditions and calculates a formula based on the success or failure of the test |
| > | Data value is greater than |
| >= | Data value is greater than or equal to |
| < | Data value is less than |
| <= | Data value is less than or equal to |
| == | Data value is equal to |
| <> or != | Data value is not equal to |
| AND |
Logical AND linking operator for multiple value tests. Result is TRUE if both conditions are TRUE. Otherwise the result is FALSE. The logical constants TRUE and FALSE are interpreted as 1 (TRUE) and 0 (FALSE) where appropriate. |
| OR |
Logical OR linking operator for multiple value tests. Result is TRUE if either condition is TRUE. Otherwise the result is FALSE. The logical constants TRUE and FALSE are interpreted as 1 (TRUE) and 0 (FALSE) where appropriate. |
| NOT |
Logical NOT operator. Result is TRUE if condition is FALSE. Result is FALSE if condition is TRUE. The logical constants TRUE and FALSE are interpreted as 1 (TRUE) and 0 (FALSE) where appropriate. |
Cross-Dimensional Operator
The cross-dimensional operator, ->, is an Essbase calculation notation for pointing to data values of specific member combinations.
To include a cross-dimensional operator in a calculation, create it using a hyphen ( - ) and a right angle bracket ( > ), with no space between them.
->The following example uses the CLEARDATA command to clear budget data for the Colas product family.
CLEARDATA Budget->Colas;The following example uses a cross-dimensional operator between two member functions to calculate the average of the children of a member across two dimensions.
@AVGRANGE(SKIPBOTH,"Sales",@CHILDREN(@CURRMBR("Product"))->@CHILDREN(@CURRMBR("Market")));