Export (0) Print
Expand All

Members (Set) (MDX)

Returns the set of members in a dimension, level, or hierarchy.

Hierarchy expression syntax 
Hierarchy_Expression.Members

Level expression Syntax
Level_Expression.Members

Hierarchy_Expression

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

Level_Expression

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

If a hierarchy expression is specified, the Members (Set) function returns the set of all members within the specified hierarchy, not including calculated members. To obtain the set of all members, calculated or otherwise, on a hierarchy use the AllMembers (MDX) function

If a level expression is specified, the Members (Set) function returns the set of all members within the specified level.

Important note Important

When a dimension contains only a single visible hierarchy, the hierarchy can be either referred to either by the dimension name or by the hierarchy name, because the dimension name in this scenario is resolved to its only visible hierarchy. For example, Measures.Members is a valid MDX expression because it resolves to the only hierarchy in the Measures dimension.

Examples

The following example returns the set of all members of the Calendar Year hierarchy in the Adventure Works cube.

SELECT 
   [Date].[Calendar].[Calendar Year].Members ON 0
FROM
   [Adventure Works]

The following example returns the 2003 order quantities for each member in the [Product].[Products].[Product Line] level. The Members function returns a set that represents all of the members in the level.

SELECT 
   {Measures.[Order Quantity]} ON COLUMNS,
   [Product].[Product Line].[Product Line].Members ON ROWS
FROM
   [Adventure Works]
WHERE
   {[Date].[Calendar Year].[Calendar Year].&[2003]}
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft