Product/Kit dimension and fact table question - sqlserver-datawarehouse
This is a discussion on Product/Kit dimension and fact table question - sqlserver-datawarehouse ; This seems like it should be fairly simple, but I think I may be too close to the situation and missing something obvious. I have a situation where the fact table will contain line item detail from sales orders so ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| to the situation and missing something obvious. I have a situation where the fact table will contain line item detail from sales orders so each fact will contain a quantity and extended price value for a given item# on a sales order. The complication comes in knowing how to factor in the "kitting" which takes place. For Kit #ABC includes part numbers #111, #222, #333 and #444. When the kit is sold, all four of those parts will appear in the fact table as separate rows with a Quantity of 1. Those same items can be sold on their own (apart from the kit), in which case another row in the table might exist for part number #111 with a Quantity of 1. Getting a sum of the number #111 sold works well, but what if I want to get a sum of the number of kit #ABC sold? Anything I do at the dimension end still seems to result in over counting since the quantity is at the individual item level (i.e. components of the kit). One thought I've had is to have a ItemQuantity field and a separate KitQuantity field. The ItemQuantity field would be treated the same as described above. The KitQuantity field would act much like an allocation whereby the quantity of the kit ordered would be distrubuted among the kit components. In the example above, the KitQuantity would be 0.25 for each of the 4 items making up the kit. Extended price would be handled in a simliar fashion. Does this approach make sense, or is there a better, more standard approach for dealing with the heirarchy of items/kits while maintaining the intregrity of the quantity and extended price fields? Thanks! Steve |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 08:27 PM.




Linear Mode