共用方式為


Name (MDX)

傳回維度、階層架構、層級或者成員的名稱。

語法

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
    傳回維度的有效多維度運算式 (MDX) 運算式。

  • Hierarchy_Expression
    傳回階層的有效多維度運算式 (MDX) 運算式。

  • Level_Expression
    傳回層級的有效多維度運算式 (MDX) 運算式。

  • Member_Expression
    傳回成員的有效多維度運算式 (MDX) 運算式。

備註

Name 函數會傳回物件的名稱,但不是唯一的名稱。

範例

維度、階層及層級運算式範例

下列範例會傳回 Date 維度的維度名稱,以及 July 2001 成員的階層和層級名稱。

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]

成員運算式範例

下列範例會傳回成員名稱,以及成員值、成員索引鍵及成員標題。

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]

請參閱

參考