dbTalk Databases Forums  

Summing over a Parent-Child

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


Discuss Summing over a Parent-Child in the microsoft.public.sqlserver.olap forum.



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

Default Summing over a Parent-Child - 09-03-2004 , 07:34 AM






I have a cube with the following structure:

Dimensions:
Clients (parent-child with several levels of clients,
with entry data at all levels)
Account Managers
Articles
Time

Measures:
Sales


Every Client has only one Account Manager. Clients below
the given node in the Clients hierarhy may have
other Account Managers.

I need a calculated measure that for a given
Account Manager sums all sales over all clients
below the ones where he is entered as Account Manager
(even though those below may have other Account Managers).

I have tried the following:

sum(
Descendants([Clients].CurrentMember,,LEAVES),
([Account Managers].[All Account Managers], [Measures].[Sales]))

Aside from being slow, it return values for every customer.
I only want the value for those clients where
who have the selected Account Manager.

Help is welcome!

Regards,
Mario

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.