Forum Discussion

HarrisonBi's avatar
HarrisonBi
Frequent Visitor
5 years ago
Solved

How to develop a data model with multiple facts and dimensions linking to eachother?

Hey guys,   I have the following tables in my data model however I am struggling to understand how to relate these tables correctly to achieve desired results. I want to be able to: Select a coun...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi HarrisonBi 

    How about creating relationships between table “Counties” and table “Supplier”, table “Counties” and table “Customer” ? Through the field “Country” to filter table “Supplier” and table “Customer” .

    Then through table “Supplier” and table “Customer” to filter other sales tables .Refer to the screenshot below .

    From the screenshot you can see the table “Customer” and table “Online Sales” ,”Photo Sales” are inactive relationship ,you can create measures to make them become active relationships .

    Online filter = CALCULATE(MAX('Online sales'[Sale ID]),USERELATIONSHIP('Online sales'[Customer ID],Customer[Customer ID]))
    Photo filter = CALCULATE(MAX('Photo Sales'[Sale ID]),USERELATIONSHIP('Photo Sales'[Customer ID],Customer[Customer ID]))

    But there is one thing to note: Inactive relationships will only be activated when measure is called in visual.

    The final result is as shown :

     

     

    I have attached my pbix file ,you can refer to it .

     

    Best Regards

    Community Support Team _ Ailsa Tao

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