Forum Discussion
PowerBI Relationships
- 2 months ago
Hi b-kopik,
In this scenario, I would avoid directly relating the two fact tables (Headcount & Campus) using a many-to-many relationship. Since both tables contain multiple rows per Employee ID, a direct relationship can create ambiguous filtering and incorrect results.
A better approach is to model this as a star schema, using shared dimension tables. Microsoft also recommends organizing Power BI models with fact and dimension tables for better filtering, usability, and performance.
Refer - Understand star schema and the importance for Power BI - Power BI | Microsoft Learn
✔️Correct Approach for creating relationships -
DimEmployee[Employee ID] 1-* FactHeadcount[Employee ID]DimEmployee[Employee ID] 1-* FactCampus[Employee ID]DimDate[Date] 1-* FactHeadcount[Month/Date]DimDate[Date] 1-* FactCampus[Course Date]💡 Helpful? Give a Kudos 👍 — keep the community growing
✅ Solved your issue? Mark as Solution ✔️ — help others find it faster
Best regards,
Rupasree Achari | BI & Fabric Analytics Engineer
Hi b-kopik,
In this scenario, I would avoid directly relating the two fact tables (Headcount & Campus) using a many-to-many relationship. Since both tables contain multiple rows per Employee ID, a direct relationship can create ambiguous filtering and incorrect results.
A better approach is to model this as a star schema, using shared dimension tables. Microsoft also recommends organizing Power BI models with fact and dimension tables for better filtering, usability, and performance.
Refer - Understand star schema and the importance for Power BI - Power BI | Microsoft Learn
✔️Correct Approach for creating relationships -
💡 Helpful? Give a Kudos 👍 — keep the community growing
✅ Solved your issue? Mark as Solution ✔️ — help others find it faster
Best regards,
Rupasree Achari | BI & Fabric Analytics Engineer
Amazing thanks so much!