Name (MDX)
Returns the name of a dimension, hierarchy, level, or member.
Syntax
Dimension expression syntax
Dimension_Expression.Name
Hierarchy expression syntax
Hierarchy_Expression.Name
Level_expression syntax
Level_Expression.Name
Member expression syntax
Member_Expression.Name
Arguments
Dimension_Expression
A valid Multidimensional Expressions (MDX) expression that returns 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 Name function returns the name of the object, not the unique name.
Examples
Dimension, Hierarchy and Level Expression Example
The following example returns the dimension name for the Date dimension and the hierarchy and level names for the July 2001 member.
WITH MEMBER Measures.DimensionName AS [Date].Name
MEMBER Measures.HierarchyName AS [Date].[Calendar].[July 2001].Hierarchy.Name
MEMBER Measures.LevelName as [Date].[Calendar].[July 2001].Level.Name
SELECT {Measures.DimensionName, Measures.HierarchyName, Measures.LevelName} ON 0
from [Adventure Works]
Member Expression Example
The following example returns the member name, along with the member value, member key and member caption.
WITH MEMBER MemberName AS [Date].[Calendar].[July 1, 2001].Name
MEMBER Measures.ValueColumn as [Date].[Calendar].[July 1, 2001].MemberValue
MEMBER Measures.KeyColumn as [Date].[Calendar].[July 1, 2001].Member_Key
MEMBER Measures.NameColumn as [Date].[Calendar].[July 1, 2001].Member_Name
SELECT {Measures.MemberName, Measures.ValueColumn, Measures.KeyColumn, Measures.NameColumn} ON 0
from [Adventure Works]