Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 exclude

Author  Topic 

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2013-01-03 : 15:40:09
hi,

my two dimensions and measure:


Dimension:Geography
Washington
Seattle
SeattleArea1
SeattleArea2
SeattleArea3
...
Spokane
SpokaneArea1
SpokaneArea2
...
California
Los Angeles
...
Arizona
...

Dimension: Time
Year
Month
Day



With measure [Measure].[Order Quantity]
and time dimension for year 2012

I would like to get: TotalSum of number of orders (break down by states (washington, California, Arizona,...))
but without SeattleArea3 and SpokaneArea1


 
SELECT
[Time].[TimeDim].[Year].[2013] ON COLUMNS

,non empty(Except (
{[Geography].[DimGeography].children}, // all the regions
{[Geography].[DimGeography].[State].&[Seattle].&[SeattleArea1]}

)
) ON ROWS
FROM
[AdventureWorks]
WHERE
([Measures].[Order Quantity]);


This query does not take into consideration the exclusion from all the geography the seattle;SeattleArea1.

Do you have any ideas how to solve this?
   

- Advertisement -