powerbidata-warehousestar-schemafact-table

Power BI star (constellation) schema: 2 fact tables with relation between each other


I need to create a data warehouse for analyzing data in an order process but I am unsure of how to proceed since my research led to conflicting information. For simplicity I will only use the most important tables to describe my issue.

TblOrder (Fact):

TblOrderSubProcess (Fact):

TblOrderInformation (Dimension):

enter image description here

Star schema being the best practise in Power BI, I am not supposed to create a relationship between TblOrder and TblOrderSubProcess but there will be visuals which need the relation between both tables.

My solution to this was to create a flat table where I TblOrder LEFT JOIN TblOrderSubProcess. This solution works but has it's flaws:

My goal is a datamodel which solves the mentioned issues and follows best practises


Solution

  • This sounds very similar to the order header - order line data modeling problem. The kimball group wrote a blog post about this below.

    https://www.kimballgroup.com/2007/10/design-tip-95-patterns-to-avoid-when-modeling-headerline-item-transactions/

    In summary, TblOrderSubProcess will be your fact table. TblOrder would be split into logical dimensions.