Calculate an Attribute Formula
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:
-
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). The @NAME function is required to process the string “Ounces” before passing it to the @ATTRIBUTEVAL function.
-
Essbase then divides Profit by the result of @ATTRIBUTEVAL to yield Profit per Ounce.
See also Attributes in Calculation Formulas.