How to get a member property for a parent?

This is a discussion on How to get a member property for a parent? within the sqlserver-olap forums in Data Warehousing category; I have a parent child hierarchy in a cube. My relational data looks like this: Client Code Parent Code Client Name Billed 00001 00001 client A 100 00002 00001 client B 200 00003 00001 client C 300 My parent child hierarchy has two levels and looks like this: All 00001 00001 00002 00003 This is fine and is what I would expect. But I need to show the aggregated total at the parent code level which works fine. However, I need to pick up the name of the Parent Code. The name is a member property of the Client Code ...

Go Back   Database Forum > Data Warehousing > sqlserver-olap

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-27-2008, 06:14 PM
Default How to get a member property for a parent?

I have a parent child hierarchy in a cube.

My relational data looks like this:

Client Code Parent Code Client Name Billed
00001 00001 client A 100
00002 00001 client B 200
00003 00001 client C 300


My parent child hierarchy has two levels and looks like this:
All
00001
00001
00002
00003

This is fine and is what I would expect.

But I need to show the aggregated total at the parent code level which
works fine. However, I need to pick up the name of the Parent Code.
The name is a member property of the Client Code attribute. I can't
seem to figure out what MDX statement will result in the following
using the above data:

Parent Code Client Name Billed
00001 Client A 600

I can get this without the Client Name without a problem. But all my
MDX statements that I have tried does not return the Client Name for
the parent.

Thanks in advance for any help.
Reply With Quote
  #2  
Old 08-28-2008, 03:43 PM
Default Re: How to get a member property for a parent?

I finally got it to work. For some reason I needed to create a
calculated member.

WITH MEMBER [Parent Name] as '[Parent
Code].currentmember.properties("Client Name")'

I could then use [Parent Name] as part of a set on the columns and the
MDX produced the results I was looking for.

If anyone can shed some light on why I needed to use a calculated
member, I would appreciate it.


On Aug 27, 5:14*pm, ny...@att.net wrote:
> I have a parent child hierarchy in a cube.
>
> My relational data looks like this:
>
> Client Code * * Parent Code * *Client Name * Billed
> 00001 * * * * * * 00001 * * * * * * *client A * * * * *100
> 00002 * * * * * * 00001 * * * * * * *client B * * * * *200
> 00003 * * * * * * 00001 * * * * * * *client C * * * * *300
>
> My parent child hierarchy has two levels and looks like this:
> All
> * *00001
> * * * 00001
> * * * 00002
> * * * 00003
>
> This is fine and is what I would expect.
>
> But I need to show the aggregated total at the parent code level which
> works fine. *However, I need to pick up the name of the Parent Code.
> The name is a member property of the Client Code attribute. *I can't
> seem to figure out what MDX statement will result in the following
> using the above data:
>
> Parent Code * * *Client Name * * * Billed
> 00001 * * * * * * * *Client A * * * * * *600
>
> I can get this without the Client Name without a problem. *But all my
> MDX statements that I have tried does not return the Client Name for
> the parent.
>
> Thanks in advance for any help.


Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 07:37 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.