A custom calculation script is a file that you create and store with a .csc extension. Create the custom calculation script with one or a series of tuple-expression pairs in MDX, terminated by semicolons. The syntax:
tuple := numeric_value_expression;
The tuple is an MDX specification of one or more members where no two members can be from the same dimension. The tuple must be on the left side of the equation and is the primary factor in determining where results of the custom calculation are written.
Only member names are allowed in the tuple expression. The use of member functions is not supported for custom calculation scripts.
Note: | The secondary factor determining the target for results is the target parameter, and the third factor is the POV parameter. You specify the second and third parameters at calculation execution time, rather than as part of the calculation script. |
The numeric_value_expression is a simple MDX numeric value expression, such as a number or an arithmetic operation. The expression must be on the right side of the equation. Only arithmetic operators are permitted. An error is returned if non arithmetic operators (such as AND, OR, or IF statements) are used.
Member names can be used in the numeric value expression, but the use of member functions is not supported for custom calculation scripts.
Attribute members cannot be used on the left side of the equation in a custom calculation script.
You must also define the source region, which serves as a performance hint for Essbase. Essbase pre-fetches the data specified in the source region, and uses that to perform the calculation specified in the script.
For an example of a custom calculation script, and more information about defining the source region, see Sample Use Case for Custom Calculations.