dbTalk Databases Forums  

MDX and calculated members

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


Discuss MDX and calculated members in the microsoft.public.sqlserver.olap forum.



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

Default MDX and calculated members - 08-26-2005 , 04:28 AM






Hello,
I have the following MDX statement which is a calculated member.

sum(descendants([Område].CurrentMember,,LEAVES)
([Measures].[Befolkningsmängd]/([Område].CurrentMember,[Measures].[Befolkningsmängd]))
/
([Measures].[Antal]/([Område].CurrentMember,[Measures].[Antal])))

The problem is that the member [Område].CurrentMember in the
divide-statement refers to the leaf-member, but I want it to refer to its
parent-member, namely the member that follows right after the
Descendants-statment.

How do I do this?

How do I do this?

Reply With Quote
  #2  
Old   
Matthias
 
Posts: n/a

Default Re: MDX and calculated members - 08-26-2005 , 06:51 AM






Hi,

did you try <...>.currentmember.parent?

cheers
Matthias

"peterw" <peterw (AT) discussions (DOT) microsoft.com> schrieb im Newsbeitrag
news:022627BE-116C-4961-8BC8-7352A46E77D7 (AT) microsoft (DOT) com...
Quote:
Hello,
I have the following MDX statement which is a calculated member.

sum(descendants([Område].CurrentMember,,LEAVES),
([Measures].[Befolkningsmängd]/([Område].CurrentMember,[Measures].[Befolkningsmängd]))
/
([Measures].[Antal]/([Område].CurrentMember,[Measures].[Antal])))

The problem is that the member [Område].CurrentMember in the
divide-statement refers to the leaf-member, but I want it to refer to its
parent-member, namely the member that follows right after the
Descendants-statment.

How do I do this?

How do I do this?



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

Default Re: MDX and calculated members - 08-27-2005 , 08:19 AM



No, because as i am using LEAVES in the descendants-statement, I do not know
at which level the parent is in. It may not be the parent, it might as well
be the parent of the parent and so on...

"Matthias" wrote:

Quote:
Hi,

did you try <...>.currentmember.parent?

cheers
Matthias

"peterw" <peterw (AT) discussions (DOT) microsoft.com> schrieb im Newsbeitrag
news:022627BE-116C-4961-8BC8-7352A46E77D7 (AT) microsoft (DOT) com...
Hello,
I have the following MDX statement which is a calculated member.

sum(descendants([Område].CurrentMember,,LEAVES),
([Measures].[Befolkningsmängd]/([Område].CurrentMember,[Measures].[Befolkningsmängd]))
/
([Measures].[Antal]/([Område].CurrentMember,[Measures].[Antal])))

The problem is that the member [Område].CurrentMember in the
divide-statement refers to the leaf-member, but I want it to refer to its
parent-member, namely the member that follows right after the
Descendants-statment.

How do I do this?

How do I do this?




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.