SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Dimension with Composite Keys and Multiple Hierarchies not giving expected results.


Dimension with Composite Keys and Multiple Hierarchies not giving expected results.

Author
Message
BluePeter
BluePeter
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 43
Hi everyone!

Basic problem:

Hierarchies with no Composite Keys roll up correctly, but for hierarchies with Composite keys all the values are the same - the total amount!

I'm busy porting a Analysis Services 2000 cube to 2005 (Yes I know they are BOTH old, but it's a restriction at the client, unfortunately.) It worked fine in 2000, but not in 2005.

I'm using Visual Studio 2008, with SSAS 2005.

My Dimension Table has the following columns:

AccountManager
Salesman
GroupL1
GroupL2
Customer
Store
StoreSalesmanAccount (for the Attribute Key)


There's no relationship between the AccountManager and the Salesman. The AccountManager is determined by the type of store, the Salesman by the geographical location.

Also, a store may have more than one Salesman, or Account Manager associated with it.

I have the following attributes defined:

For the Customer Hierarchy:
GroupL1
GroupL2
Customer
Store


For the AccountManager Hierarchy:
AccountManager
AccGroupL1 (KeyColumns -> GroupL1 and AccountManager)
AccGroupL2 (KeyColumns -> GroupL2 and AccountManager)
AccCustomer (KeyColumns -> Customer and AccountManager)
AccStore (KeyColumns -> Store and AccountManager)


For the Salesman Hierarchy:
Salesman
SalGroupL1 (KeyColumns -> GroupL1 and Salesman)
SalGroupL2 (KeyColumns -> GroupL2 and Salesman)
SalCustomer (KeyColumns -> Customer and Salesman)
SalStore (KeyColumns -> Store and Salesman)


(I rename them to Store in the Hierarchies, so that I don't get this ugly AccStore and SalStore.)

The Relationships are as follows:
StoreSalesmanAccount -> Store -> Customer -> GroupL2 -> GroupL1
StoreSalesmanAccount -> SalStore -> SalCustomer -> SalGroupL2 -> SalGroupL1 -> Salesman
StoreSalesmanAccount -> AccStore -> AccCustomer -> AccGroupL2 -> AccGroupL1 -> AccountManager


So for the Customer Hierarchy I get the following values:

Customer
Group1 = 10
---- Group1a = 6
---- Group1b = 3
---- Group1c = 1
Group2 = 5
Group3 = 12
Group4 = 4
Grand Total = 31


For the Hierarchies with Composite Keys I get:

AccountManager
Account1 = 31
---- Group1 = 31
---- Group2 = 31
---- Group3 = 31
---- Group4 = 31
Account2 = 31
Account3 = 31

Grand Total = 31

And the same with the Salesman

Drilling Down into the Hierarchy, every single value is 31!
So, Account1 is 31, all the members at GroupL1 (the level below Account1) have values of 31. All the leaf members have values of 31.

Help please, I'm obviously missing something simple somewhere... but don't know what it is.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search