評估兩個集合,並移除第一組中同時存在於第二組的元組,並可選擇保留重複的元組。
Syntax
Except(Set_Expression1, Set_Expression2 [, ALL ] )
論點
Set_Expression1
一個有效的多維表達式(MDX)表達式,能回傳一個集合。
Set_Expression2
一個有效的多維表達式(MDX)表達式,能回傳一個集合。
備註
若指定為 ALL ,函數會保留第一組中發現的重複函數;第二組中發現的重複物品仍會被移除。 成員依照第一組出現的順序回歸。
Examples
以下範例展示了此函數的使用。
//This query shows the quantity of orders for all products,
//with the exception of Components, which are not
//sold.
SELECT
[Date].[Month of Year].Children ON COLUMNS,
Except
([Product].[Product Categories].[All].Children ,
{[Product].[Product Categories].[Components]}
) ON ROWS
FROM
[Adventure Works]
WHERE
([Measures].[Order Quantity])