Returns, for the current member being calculated, the associated attribute value from the specified numeric or date attribute dimension.
Single dimension specification for a numeric or date attribute dimension.
The @ATTRIBUTEVAL function works only with numeric and date attribute dimensions. To return values from text attribute dimensions, use the @ATTRIBUTESVAL function. To return values from Boolean attribute dimensions, use the @ATTRIBUTEBVAL function. For more information on types of attributes, see the Oracle Essbase Database Administrator's Guide.
Only level 0 members of attribute dimensions can be associated as attributes of members of a base dimension.
If there is no attribute associated with the member being calculated, or if the attribute associated with the member is a text attribute, @ATTRIBUTEVAL returns #MISSING.
When the @ATTRIBUTEVAL function is used with a date attribute dimension, Essbase converts the date string to the number of seconds elapsed since midnight, January 1, 1970.
The following example is based on the Sample Basic database:
"Profit Per Ounce" = Profit/@ATTRIBUTEVAL(@NAME(Ounces));
In this formula, for the current member being calculated, @ATTRIBUTEVAL returns the associated attribute from the Ounces numeric attribute dimension. For example, if the member being calculated is Cola and if the Ounces attribute value associated with Cola is 12, @ATTRIBUTEVAL returns 12. The value returned is then divided into Profit to yield Profit Per Ounce.
The @NAME function is required to process the string “Ounces” before passing it to the @ATTRIBUTEVAL function.
This example produces the following report:
Actual Year West Profit Profit Per Ounce ======== ================ Cola 4593 382.75
The following MaxL execute calculation statement applies a formula to members that are 16 Oz products:
execute calculation 'Misc ( IF (@ATTRIBUTEVAL(Ounces) == 16) Misc = .5; ENDIF; );' on sample.basic;