SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 exclude
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

slimt_slimt
Aged Yak Warrior

Switzerland
746 Posts

Posted - 01/03/2013 :  15:40:09  Show Profile  Reply with Quote
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?
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000