Calculating an Attribute Formula

You can perform specific calculations on attribute-dimension members in a database. See Calculating Attribute Data.

For example, to calculate profitability by ounce for products sized in ounces, you can use the @ATTRIBUTEVAL function in a calculation formula. In the Sample.Basic database, the Ratios branch of the Measures dimension contains a member called Profit per Ounce. The formula on this member:

Profit/@ATTRIBUTEVAL(@NAME(Ounces));

Essbase cycles through the Products dimension, performing the following calculations:

  1. For each base member that is associated with a member from the Ounces attribute dimension, the @ATTRIBUTEVAL function returns the numeric attribute value (for example, 12 for the member 12 under Ounces).

    Note:

    The @NAME function is required to process the string “Ounces” before passing it to the @ATTRIBUTEVAL function.

  2. Essbase then divides Profit by the result of @ATTRIBUTEVAL to yield Profit per Ounce.

Note:

See Using Attributes in Calculation Formulas. For more information about the @ATTRIBUTEVAL function, see the Oracle Essbase Technical Reference.