Forum Discussion
Design a fact_table as dimension
Hi,
in the case we have an OrderDetail table and an OrderHeader table which relate:
OrderDetail n:1 OrderHeader
One OrderHeader can have multiple OrderDetails, but one OrderDetail can only have one OrderHeader.
Can I design that OrderHeader table as a dimension table for describing the fact_OrderDetail?
Technically this dim_OrderHeader is a fact table, because there are a lot of inserts, everytime an Order gets placed, or am I wrong?
3 Replies
- amitchandak
Super User
Anonymous , Order header can be used as a dimension. But order details fact need to merged copy of header and details with all dimension key from both tables copied to this fact.
- AnonymousNot applicable
amitchandak What? I just want to use the OrderDetails as fact and store the dim_OrderHeader_id in it and join with that to the dim_OrderHeader, because that is the unique identifier.
- v-xulin-mstf
Community Support
Hi Anonymous,
You can do this, have you encountered any issues?
You can refer the following link about Star schem, this meets the scenario you need.
https://docs.microsoft.com/en-us/power-bi/guidance/star-schema
Best Regards,
LinkIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.