@ATTRIBUTESVAL

The @ATTRIBUTESVAL calculation function for Essbase returns a member's text attribute value.

This function returns, for the current member being calculated, the associated attribute value from the specified text attribute dimension.

Syntax

@ATTRIBUTESVAL (attDimName)

Parameters

attDimName

The name of a text attribute dimension.

Notes

  • This function works only with text attribute dimensions. To return values from numeric or date attribute dimensions, use @ATTRIBUTEVAL. To return values from Boolean attribute dimensions, use @ATTRIBUTEBVAL.

  • If no attribute is associated with the member being calculated or if the attribute associated with the member is a numeric, Boolean, or date attribute, this function returns an empty string.

  • Only level 0 members of attribute dimensions can be associated as attributes of members of a base dimension.

Example

This example is based on the Sample Basic database.

The Product dimension is associated with the Pkg Type text attribute dimension, as shown in the following example:

Product {Pkg Type}
    100
       100-10 {Pkg Type:Can}
       100-20 {Pkg Type:Can}
       100-30 {Pkg Type:Bottle}
    200
       200-10 {Pkg Type:Bottle}
       200-20 {Pkg Type:Bottle}
       200-30 {Pkg Type:Bottle}
       200-40 {Pkg Type:Bottle}
Pkg Type Attribute {Type: Text}
    Bottle
    Can

For the current member of the base dimension, Product, @ATTRIBUTESVAL("Pkg Type") returns the associated attribute value from the text attribute dimension, Pkg Type. The following table shows the value that would be returned:

Table 2-16 Values Returned for @ATTRIBUTESVAL("Pkg Type") Function

Current Member Return Value
100-10 Can
100-20 Can
100-30 Bottle
100 (empty string)
200-10 Bottle
200-20 Bottle
200-30 Bottle
200-40 Bottle
200 (empty string)
Product (empty string)

For any member that does not have an associated attribute, an empty string is returned.