dbTalk Databases Forums  

MDX - Expanding Specific members in a cross join

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


Discuss MDX - Expanding Specific members in a cross join in the microsoft.public.sqlserver.olap forum.



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

Default MDX - Expanding Specific members in a cross join - 10-06-2003 , 04:43 PM







Is there a way to DrilldownMember a specific member in a
cross join. Take the MDX query

SELECT {CROSSJOIN({[Customers].[All Customers].children},
{[Product].[All Products].children})} on 0 from [Sales]

I would like to DrilldownMember on [Drink] under [USA]
is this possible?

Tom


Reply With Quote
  #2  
Old   
Tom Chester
 
Posts: n/a

Default Re: MDX - Expanding Specific members in a cross join - 10-06-2003 , 06:05 PM






Is this what you mean...?

SELECT
Crossjoin(
[Customers].[All Customers].children ,
{ [Product Family].Members, Drink.Children }
) on 0
FROM Sales

(not sytax checked)

tom @ the domain below
www.tomchester.net


"Tom George" <thenasian (AT) yahoo (DOT) com> wrote

Quote:
Is there a way to DrilldownMember a specific member in a
cross join. Take the MDX query

SELECT {CROSSJOIN({[Customers].[All Customers].children},
{[Product].[All Products].children})} on 0 from [Sales]

I would like to DrilldownMember on [Drink] under [USA]
is this possible?

Tom




Reply With Quote
  #3  
Old   
Tom George
 
Posts: n/a

Default Re: MDX - Expanding Specific members in a cross join - 10-06-2003 , 06:26 PM




Sorry for not being more clear. I want only the Drink
under USA to be drilleddown, not drink under Mexico or
Canada. What I want is something like this


Canada Drink
Canada Food
Canada Non-Consumable
Mexico Drink
Mexico Food
Mexico Non-Consumable
USA Drink
USA Alcoholic Beverage
USA Beverages
USA Diary
USA Food
USA Non-Consumable




Quote:
-----Original Message-----
Is this what you mean...?

SELECT
Crossjoin(
[Customers].[All Customers].children ,
{ [Product Family].Members, Drink.Children }
) on 0
FROM Sales

(not sytax checked)

tom @ the domain below
www.tomchester.net


"Tom George" <thenasian (AT) yahoo (DOT) com> wrote in message
news:097a01c38c52$daa5ed20$a101280a (AT) phx (DOT) gbl...

Is there a way to DrilldownMember a specific member in
a
cross join. Take the MDX query

SELECT {CROSSJOIN({[Customers].[All
Customers].children},
{[Product].[All Products].children})} on 0 from
[Sales]

I would like to DrilldownMember on [Drink] under [USA]
is this possible?

Tom



.


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

Default Re: MDX - Expanding Specific members in a cross join - 10-06-2003 , 10:34 PM



The output of this (gnarly) query matches what you want:

Quote:
SELECT {[Measures].[Unit Sales]} on 0,
Hierarchize(DrillDownMember(Filter(CROSSJOIN([Customers].[All
Customers].children,
[Product].[All Products].children),Customers.CurrentMember is
[Customers].[All Customers].[USA]),
{[Product].[All Products].[Drink]})+Filter(CROSSJOIN([Customers].[All
Customers].children,
[Product].[All Products].children),not Customers.CurrentMember is
[Customers].[All Customers].[USA])) on 1
from [Sales]
Quote:
- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
  #5  
Old   
Brian Altmann
 
Posts: n/a

Default Re: MDX - Expanding Specific members in a cross join - 10-07-2003 , 08:10 AM



There's more than one way to do this.
Here is one:

SELECT
hierarchize( { { CROSSJOIN({[Customers].[All
Customers].children},{[Product].[All
Products].children}) } + { {[customers].usa} *
{drink.children} } })
on 0 from [Sales]

+ stands for UNION and * stands for CROSSJOIN

HTH,
Brian
www.geocities.com/brianaltmann/olap.html


Quote:
-----Original Message-----

Sorry for not being more clear. I want only the Drink
under USA to be drilleddown, not drink under Mexico or
Canada. What I want is something like this


Canada Drink
Canada Food
Canada Non-Consumable
Mexico Drink
Mexico Food
Mexico Non-Consumable
USA Drink
USA Alcoholic Beverage
USA Beverages
USA Diary
USA Food
USA Non-Consumable




-----Original Message-----
Is this what you mean...?

SELECT
Crossjoin(
[Customers].[All Customers].children ,
{ [Product Family].Members, Drink.Children }
) on 0
FROM Sales

(not sytax checked)

tom @ the domain below
www.tomchester.net


"Tom George" <thenasian (AT) yahoo (DOT) com> wrote in message
news:097a01c38c52$daa5ed20$a101280a (AT) phx (DOT) gbl...

Is there a way to DrilldownMember a specific member in
a
cross join. Take the MDX query

SELECT {CROSSJOIN({[Customers].[All
Customers].children},
{[Product].[All Products].children})} on 0 from
[Sales]

I would like to DrilldownMember on [Drink] under [USA]
is this possible?

Tom



.

.


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.