I'm quite new to data warehousing and dimensional modelling and I need clarification on a few things. I currently have the following dimensions:
- DimProducts - Information about a product.
- DimMaterials - Information about materials that go into a product.
- DimLocation - Different store locations
- DimTime - Standard time dimension with year, quarter, month, week, day.
Now comes the confusion with regards to the fact table. Currently it has the following measures:
- Revenue
- Expenses
Questions:
- I would like to have net profit as a measure as well, but since it is a calculated measure, should it be a column in the fact table or should it be calculated at report-level? I'm a little unclear about the conventions with regards to calculated measures.
- I would also like to know how many raw materials are available at a point in time so that I may conduct calculations about how much product I can make (For example, 2 wheels for 1 bike means 50 wheels available in March would yield 25 bikes for month of March). Should I add a fact called raw material quantity?
I have a feeling I'm approaching question #2 wrong and that I need to create separate fact table to deal with the problem. Would really appreciate any advice/tips on whether or not I'm on the right track. Thanks!