dbTalk Databases Forums  

Exclusion question

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Exclusion question in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sam
 
Posts: n/a

Default Exclusion question - 07-13-2006 , 12:17 PM






I have a MDX query giving me data for following states:
MA
NH
CA
NY

Now requirement is one case I want All Locations and second case I want all
except "CA".
How can it possible with one MDX query?

Thanks,
Sam

Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Exclusion question - 07-13-2006 , 09:27 PM






Will the Except() function work for your case, like:

Quote:
select {[Measures].[Internet Order Quantity]} on 0,
Non Empty Except(
[Customer].[Customer Geography].[Country].&[United States].Children,
[Customer].[Customer Geography].[State-Province].&[CA]&[US]) on 1
from [Adventure Works]
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #3  
Old   
Sam
 
Posts: n/a

Default Re: Exclusion question - 07-14-2006 , 11:15 AM



Deepak,
The Except function did not work, but let me reephrase my requirement. In
report I am comparing uniqunames.
Ex: Reports location dataset giving me list of location dimension unique
names. The parameter from UI is also location unique name. When this matchs
whith reportlist gives me resultset.
So now question is, can I add a Unique Name in reports dataset MDX query
with exclusion of "CA"

Thanks,
Sam

"Deepak Puri" wrote:

Quote:
Will the Except() function work for your case, like:


select {[Measures].[Internet Order Quantity]} on 0,
Non Empty Except(
[Customer].[Customer Geography].[Country].&[United States].Children,
[Customer].[Customer Geography].[State-Province].&[CA]&[US]) on 1
from [Adventure Works]



- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #4  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Exclusion question - 07-14-2006 , 11:40 PM



Hi Sam,

Could you possibly translate you requirement to Adventure Works, with an
example or 2 - I'm somewhat stumped by your description?


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.