Export (0) Print
Expand All
Avg
IIf
Lag
Max
Min
Mtd
Qtd
Sum
Var
Wtd
Ytd
Expand Minimize

Members (Set) (MDX)

Updated: 17 July 2006

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.

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

ms144851.note(en-US,SQL.90).gifImportant:
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.

ELECT 
   [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]}

Release History

17 July 2006

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

Community Additions

ADD
Show:
© 2014 Microsoft