@ATTRIBUTEVAL
The @ATTRIBUTEVAL calculation function for Essbase returns a member's numeric or date attribute value.
This function returns, for the current member being calculated, the associated attribute value from the specified numeric or date attribute dimension.
Syntax
@ATTRIBUTEVAL (attDimName)
Notes
-
This function works only with numeric and date attribute dimensions. To return values from text attribute dimensions, use @ATTRIBUTESVAL. To return values from Boolean attribute dimensions, use @ATTRIBUTEBVAL.
-
Only level 0 members of attribute dimensions can be associated as attributes of members of a base dimension.
-
If a text attribute, or no attribute, is associated with the member being calculated, this function returns
#MISSING
. -
When this function is used with a date attribute dimension, it converts the date string to the number of seconds elapsed since midnight, January 1, 1970.
Example
Example 1
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.
Note:
@NAME is required to process the string “Ounces” before passing it to @ATTRIBUTEVAL.
This example produces the following report:
Actual Year West
Profit Profit Per Ounce
======== ================
Cola 4593 382.75
Example 2
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;