Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Star schema modelin OrderHeader and OrderDetails

Hi,

 

I have and OrderHeader table with the unique Order_id and the OrderDetails with many products, which relates to one Order.

 

So: OrderHeader 1:n OrderDetails 

 

Should i put OrderHeader and OrderDetails in one fact table or should i seperate them into two facts and build a 1:n relationship based on Order_id between them? 

 

What is best practise? 

 

 

 

 

1 ACCEPTED SOLUTION
KNP
Super User
Super User

@Anonymous- that is very dependent on what you're trying to achieve with your reporting from this model and probably not really enough info to provide a definitive answer. 

For example, if there's a need to report on individual orders, your order headers table may act as a dimension and if that level of granularity is not required, then @amitchandak may be correct and merging the tables may be the correct approach.

 

It would probably be worthwhile sharing a screen shot of the model as it stands currrently showing the existing relationships.

 

Best practice for Power BI performance is always a star schema but defining whether something is a fact or dimension often depends on the grain required for reporting.

 

Hope this helps.

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

View solution in original post

3 REPLIES 3
KNP
Super User
Super User

@Anonymous- that is very dependent on what you're trying to achieve with your reporting from this model and probably not really enough info to provide a definitive answer. 

For example, if there's a need to report on individual orders, your order headers table may act as a dimension and if that level of granularity is not required, then @amitchandak may be correct and merging the tables may be the correct approach.

 

It would probably be worthwhile sharing a screen shot of the model as it stands currrently showing the existing relationships.

 

Best practice for Power BI performance is always a star schema but defining whether something is a fact or dimension often depends on the grain required for reporting.

 

Hope this helps.

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!
Anonymous
Not applicable

"need to report on individual orders, your order headers table may act as a dimension (...)"

I dont want to lose any information so this is required. And in the end I want so say which OrderDetails are related to which OrderHeader. That is simply a 1:n relationship, but that is not best practise for facts... Is it allowed to let the degenerated dimension "order_id" in the OrderHeader be a dimension for the OrderDetails? 

 

 

 

amitchandak
Super User
Super User

@Anonymous , On fact, so the dimension related both header and details can directly join to this new fact.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.