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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Vanessa250919
Helper IV
Helper IV

Two table FACT

Hello community,

 

I have one question, I just create a new dataset. I have two FACT table and muplite DIM TABLE .

 

I think it's better to make a constalation schema . But I don't know which relation to use between tables to have consistent data and no duplicate, 1 to 1, many to one ... Simple direction both ...

 

Calendar & Employee  will be used like link table ? 

 

thanks in advance for your help 

 

Capture.JPG

5 REPLIES 5
v-deddai1-msft
Community Support
Community Support

Hi @Vanessa250919 ,

 

Star Schema is the best way of designing a data model for reporting, You will get the best performance and also flexibility using such a model.

 

Your situation is a good fit for the star schema, you can create one to many relationship between your DIM TABLE and Fact table. Keep it single direction and Avoid using many-to-many relationship. 

 

For more details, please refer to https://radacad.com/power-bi-basics-of-modeling-star-schema-and-how-to-build-it

 

If this post help, please consider accept it as the solution to help other member find it more quickly.

 

Best Regards,

Dedmon Dai

I try to make the same schema, but I have one error message . 

 

Vanessa250919_1-1604910776678.pngVanessa250919_2-1604910791515.png

 

 

Hi @Vanessa250919 ,

 

Would you please try to combine these two fact tables into one? If it can't be done, you can try to change the relationship between a fact table and other dimtables from single to both  which will take these tables treated as a single table. For more details, please refer to the similar post:https://community.powerbi.com/t5/Desktop/Relationship-between-multiple-facts/m-p/1133635

 

If this post help, please consider accept it as the solution to help other member find it more quickly.

 

Best Regards,

Dedmon Dai

Hello,

Thanks for your answer, but I have two FACT tables and I don't know the relationship between my two fact tables.

PaulDBrown
Community Champion
Community Champion

@Vanessa250919 

 

In general, you should be creating Dimension tables (including the calendar table) for fields which are common to both fact tables and join the dimension table to your fact tables by a one-to-many (single direction) or one-to-one.

Avoid many-to-many at all costs.

 

Here is a simple example:

Two fact table model.JPG

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.