Member Formulas

Essbase formulas calculate relationships between members in a database outline. You can apply them to members in the outline, and/or use them in calculation scripts for strict control of your calculations.

Member formulas are used to calculate the default outline format on a custom formula within the script. As with formulas in the database outline, a formula in a calculation script defines mathematical relationships between database members. For example, the following expressions are valid within a calculation script:

"Profit_%";

Specifying a member name with a formula defined in the outline calculates the member using its formula.

Expenses = Payroll + Marketing;

The above formula expresses a simple mathematical relationship, which is used in place of the database outline formula on the Expenses member.

Interdependent Member Formulas

Essbase optimizes calculation performance by calculating formulas for a range of members in the same dimension. However, some formulas require values from members of the same dimension. A good example is that of cash flow, in which the opening inventory is dependent on the closing inventory from the previous month.

When you use an interdependent formula in a calc script, the same rules apply as for the IF statement. You need to:

  • Associate the formula with a single member

  • Enclose the formula in parentheses

If you place the following interdependent formula in a calc script, you construct it as follows:

"Opening Inventory" (IF(NOT @ISMBR (Jan))"Opening Inventory" = 
@PRIOR("Ending Inventory"));
ENDIF;
"Ending Inventory" = "Opening Inventory" - Sales + Additions;)

The entire formula is enclosed in parentheses and associated with the Opening Inventory member.