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

Extract (MDX)

Returns a set of tuples from extracted hierarchy elements.

Extract(Set_Expression, Hierarchy_Expression1 [,Hierarchy_Expression2, ...n] )

Set_Expression

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

Hierarchy_Expression1

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

Hierarchy_Expression2

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

The Extract function returns a set that consists of tuples from the extracted hierarchy elements. For each tuple in the specified set, the members of the specified hierarchies are extracted into new tuples in the result set. This function always removes duplicate tuples.

The Extract function performs the opposite action of the Crossjoin function.

Examples

The following query shows how to use the Extract function on a set of tuples returned by the NonEmpty function:

SELECT [Measures].[Internet Sales Amount] ON 0,

//Returns the distinct combinations of Customer and Date for all purchases

//of Bike Racks or Bike Stands

EXTRACT(

NONEMPTY(

[Customer].[Customer].[Customer].MEMBERS

*

[Date].[Date].[Date].MEMBERS

*

{[Product].[Product Categories].[Subcategory].&[26],[Product].[Product Categories].[Subcategory].&[27]}

*

{[Measures].[Internet Sales Amount]}

)

, [Customer].[Customer], [Date].[Date])

ON 1

FROM [Adventure Works]

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft