Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to set up data model with 2 fact tables

Hi all,   I've been building a report about the backlog of our company. This data model consists of one fact table (all current sales orderlines that are in backlog) and several dimension tables. ...
  • v-xicai's avatar
    6 years ago

    Hi Anonymous ,

     

    The suggestions of tex628 and PaulDBrown are great.

     

    If the data structure of backlog table is the same with closes sales lines table, you might use Append feature to combine the two tables into one table, see more about how to append: Append vs. Merge in Power BI and Power Query . While before using append feature, you might add custom column to distinguish and identify the backlog table and closes sales lines table , see setting like below.

     

    If the data structure is different between the two tables , and you wouldn't like to create many to many relationship, then you can create intermediate table like DAX below. Finally, create many to one relationship between the two fact table and new table.

     

    New calculated Table = UNION(DISTINCT(backlog[orderlines]), DISTINCT('closes sales lines'[orderlines]))

     

    Best Regards,

    Amy

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.