提取物(MDX)

從提取的階層元素回傳一組元組。

Syntax

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

論點

Set_Expression
一個有效的多維表達式(MDX)表達式,能回傳一個集合。

Hierarchy_Expression1
一個有效的多維表達式(MDX)表達式,能回傳階層結構。

Hierarchy_Expression2
一個有效的多維表達式(MDX)表達式,能回傳階層結構。

備註

Extract 函式回傳一組由從所提取階層元素組成的元組。 對於指定集合中的每個元組,該階層的成員會被提取成結果集合中的新元組。 此函式總是會移除重複的元組。

Extract 函式執行與 Crossjoin 函式相反的動作。

Examples

以下查詢說明如何對 NonEmpty 函式回傳的元組使用萃取函數:

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]