Here's an example Adventure Works query, which returns [Order Quantity]
when either the Date is "Jul 31, 2001" (= 5) or the Product Name is
"Road-150 Red, 44" (= 437). Note that the total is 441, not 442, because
[Order Quantity] = 1 when both conditions apply, so this should not be
double-counted.
Quote:
|
select {[Measures].[Order Quantity]} on 0
|
from [Adventure Works]
where {([Date].[Calendar].[Date].&[31],
[Product].[Product Categories].[All Products]),
([Date].[Calendar].[All Periods],
[Product].[Product Categories].[Product Name].&[311])}
------------------------------------------------------
Order Quantity
441
- Deepak
Deepak Puri
Microsoft MVP - SQL Server
*** Sent via Developersdex http://www.developersdex.com ***