@NAME

The @NAME calculation function for Essbase passes the enclosed string, or list of member or dimension names, as a list of strings to another function.

Syntax

@NAME (mbrName [,UNIQUE])

Parameters

mbrName

A list of member names, dimension names, or strings.

UNIQUE

Tells @NAME to return a unique member name (using shortcut qualified name format) for mbrName, if mbrName is a duplicate name. If mbrName is not a duplicate name or if duplicate member names is not enabled, UNIQUE is ignored, and only the member name is returned. The following considerations apply:

  • Essbase does not support strings in functions. It treats strings as values or an array of values. @NAME processes strings.

  • To learn more about the shortcut qualified name format used for unique member names, see Creating and Working With Duplicate Member Outlines.

Example

Example 1

The following example is based on the Sample Basic database. A user-defined function is used to retrieve the price from the table below. The user defined function (J_GetPrice) takes two string parameters, time and product name, to return the price for each product.

Table 2-30 Price Data in Sample Basic Database

MonthName ProductId Price
Jan 100-10 1.90
Feb 100-10 1.95
Mar 100-10 1.98
Jan 100-20 1.95
Feb 100-20 2.00
Mar 100-20 2.05
Price = @J_GetPrice(@NAME(@CURRMBR(Product)),@NAME(@CURRMBR(Year)));

The following report illustrates the above example:

               Price   Actual  Market
                Jan     Feb     Mar
                ===     ===     ===
      100-10   1.90    1.95    1.98
      100-20   1.95    2.00    2.05

Example 2

The following example is based on the Sample Basic database:

"Profit Per Ounce" = Profit/@ATTRIBUTEVAL(@NAME(Ounces));

The @NAME function processes 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 3

For the following example, assume an outline that has duplicate member names enabled, and there are two members named New York in the Market dimension:


Hierarchy from a duplicate member outline, showing duplicate members [State].[New York] and [City].[New York].

The qualified member names for the New York members are [State].[New York] and [City].[New York].

The following example captures a qualified member name from the current calculation context:

@MEMBER(@NAME(@CURRMBR("Market"), UNIQUE)) 

If the current member of Market being calculated is the New York State member, the qualified member name, [State].[New York], is passed to @MEMBER, effectively differentiating it from the New York City member.

See Also