dbTalk Databases Forums  

MDX to find the parents of shared member.

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


Discuss MDX to find the parents of shared member. in the microsoft.public.sqlserver.olap forum.



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

Default MDX to find the parents of shared member. - 05-12-2004 , 10:50 AM






Hi All,
I have a dimension where a child can have more than one parent. I want
to find all the parents of a particular child and Agg. the measure
based on that set. In short I want to find the total of a shared
member, even though its shared between different parents. For example
my pseudo MDX is

Sum ({Find all the parents under which the current member is shared},
[Measure].[Measure Name])

Thanks in advance.
Nik

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

Default Re: MDX to find the parents of shared member. - 05-12-2004 , 07:27 PM






This earlier example from Foodmart may help you:

http://groups.google.com/groups?hl=e...0DHA.2480%40TK
2MSFTNGP10.phx.gbl
Quote:
From: Deepak Puri (deepak_puri (AT) progressive (DOT) com)

Subject: Re: Descendants Problem
View: Complete Thread (2 articles)
Original Format
Newsgroups: microsoft.public.sqlserver.olap
Date: 2004-01-05 18:44:28 PST

Here is a Foodmart Sales cube query that categorizes all descendants of
a product at the Brand Name level. Note that, although a Brand Name may
appear multiple times in the hierarchy, each is listed only once in the
results. This seems similar to what you are trying to do:

Quote:
With Set BrandNames AS
'CreatePropertySet([Store],
Descendants([Product].CurrentMember,[Product].[Brand
Name]),
[Product].CurrentMember.Name)'
Select {[Unit Sales]} ON COLUMNS,
TopCount(BrandNames,10,[Measures].[Unit Sales]) ON ROWS
From Sales
Where [Product].[All Products].[Drink]
Quote:
The "CreatePropertySet()" MDX function is not documented in BOL, but
here is a SQL Server mag article by Russ Whitney.
In it, limitations on the maximum set size are discussed:

http://www.sqlmag.com/Articles/Index...rticleID=16302
Quote:

- Deepak

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


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.