Redigera

Dela via


UniqueName (MDX)

Returns the unique name of a specified dimension, hierarchy, level, or member.

Syntax

  
Dimension expression syntax  
Dimension_Expression.UniqueName  
  
Hierarchy expression syntax  
Hierarchy_Expression.UniqueName  
  
Level expression syntax  
Level_Expression.UniqueName  
  
Member expression syntax  
Member_Expression.UniqueName  

Arguments

Dimension_Expression
A valid Multidimensional Expressions (MDX) expression that resolves to a dimension.

Hierarchy_Expression
A valid Multidimensional Expressions (MDX) expression that returns a hierarchy.

Level_Expression
A valid Multidimensional Expressions (MDX) expression that returns a level.

Member_Expression
A valid Multidimensional Expressions (MDX) expression that returns a member.

Remarks

The UniqueName function returns the unique name of the object, not the name returned by the Name function. The returned name does not include the name of the cube. The results returned depend upon the server-side settings or the MDX Unique Name Style connection string property.

Example

The following example returns the unique name value for the Product dimension, the Product Categories hierarchy, the Subcategory level, and the Bike Racks member in the Adventure Works cube.

WITH MEMBER DimensionUniqueName   
   AS [Product].UniqueName  
MEMBER HierarchyUniqueName   
   AS [Product].[Product Categories].UniqueName  
MEMBER LevelUniqueName   
   AS [Product].[Product Categories].[Subcategory].UniqueName  
MEMBER MemberUniqueName   
   AS [Product].[Product Categories].[Subcategory].[Bike Racks]  
SELECT   
   {DimensionUniqueName  
   , HierarchyUniqueName  
   , LevelUniqueName  
   , MemberUniqueName }  
   ON 0  
FROM [Adventure Works]  

See Also

MDX Function Reference (MDX)