dbTalk Databases Forums  

unleveled dimension

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


Discuss unleveled dimension in the microsoft.public.sqlserver.olap forum.



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

Default unleveled dimension - 02-07-2006 , 11:57 AM






Fact table (the qty is at the ProdNbr level):

Qty ProdNbr
100 A1111
200 A2222

Prod dimension (this is a shard dim. other fact tables have qty at the
ChildProd level):

ProdNbr ChildProd
A1111 11
A1111 12
A1111 13

When the cube is built, the qty for A1111 becomes 300 (100 for each of the
child). What do I do here? The QTY for A1111 should be 100 and it can be "0"
at the ChildProd level. I need to build a virtual cube based on the "prod
dim" to compare at ProdNbr level.... other cubes do have measure at the
ChildProd leve.

Thanks for any help.




Reply With Quote
  #2  
Old   
 
Posts: n/a

Default Re: unleveled dimension - 02-08-2006 , 04:55 AM






If ProdNbr is not unique then you should create a surrogate key (which
is considered a best practice anyway as it helps in dealing with slowly
changing dimensions)

eg.
ProdId ProdNbr ChildProd
1 A1111 11
2 A1111 12
3 A1111 13
4 A2222 ...

Then insert into the fact table based on this surrogate key (ProdId)

eg.
Qty ProdId
100 1
200 4

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <62258772-AA17-4303-88A9-154BF29496AB (AT) microsoft (DOT) com>,
christy (AT) discussions (DOT) microsoft.com says...
Quote:
Fact table (the qty is at the ProdNbr level):

Qty ProdNbr
100 A1111
200 A2222

Prod dimension (this is a shard dim. other fact tables have qty at the
ChildProd level):

ProdNbr ChildProd
A1111 11
A1111 12
A1111 13

When the cube is built, the qty for A1111 becomes 300 (100 for each of the
child). What do I do here? The QTY for A1111 should be 100 and it can be "0"
at the ChildProd level. I need to build a virtual cube based on the "prod
dim" to compare at ProdNbr level.... other cubes do have measure at the
ChildProd leve.

Thanks for any help.





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.