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

Dimension (MDX)

Returns the hierarchy that contains a specified member, level, or hierarchy.


          

Hierarchy syntax
Hierarchy_Expression.Dimension

Level syntax
Level_Expression.Dimension

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

Examples

The following example uses the Dimension function, in conjunction with the Name function, to return the hierarchy name of the specified member.

WITH member measures.x as [Product].[Product Model Lines].[Model].&[HL Road Tire].Dimension.Name
SELECT measures.x on 0
FROM [Adventure Works]

The following example uses the Dimension function, in conjunction with the Levels and the Count functions, to return the number of levels in the hierarchy containing the specified member.

WITH member measures.x as [Product].[Product Model Lines].[Model].&[HL Road Tire].Dimension.Levels.Count
SELECT measures.x on 0
FROM [Adventure Works]

The following example uses the Dimension function, in conjunction with the Members and the Count functions, to return the number of members in the hierarchy containing the specified member.

WITH member measures.x as [Product].[Product Model Lines].[Model].&[HL Road Tire].Dimension.Members.Count
SELECT measures.x on 0
FROM [Adventure Works]
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.