Export (0) Print
Expand All
Avg
IIf
Lag
Max
Min
Mtd
Qtd
Sum
Var
Wtd
Ytd
Expand Minimize
This topic has not yet been rated - Rate this topic

Name (MDX)

Updated: 17 July 2006

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


Dimension expression syntax
Dimension_Expression.Name

Hierarchy expression syntax
Hierarchy_Expression.Name

Level_expression syntax
Level_Expression.Name

Member expression syntax
Member_Expression.Name
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.

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]

Release History

17 July 2006

Changed content:
  • Updated syntax and arguments to improve clarity.
  • Added updated examples.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.