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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ovonel
Post Prodigy
Post Prodigy

How to deal with many to many dimensions in Tabular?

I have this model:

ovonel_0-1660648217968.png

 

 

Emp Roles is an unpivot that has Manager1 and Manager2 from Contracts and Manager1 and Manager2 from Clients:

  • Each Contract/Client can appear multiple times in Fact.
  • Each Fact row belongs to only one Contract and only one Client

As expected, a given client can have different contracts… (And, a given contract can belong to multiple clients too).

Therefore clients and contracts is Many to Many too.

 

My problem is that when in Power BI I combine a manager from Emp Roles with a fact measure I get some wrong results.

 

Is there any way for this to work?

 
1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. Unless you need to check fact numbers of EmpRoles exactly by client or by contracts, the snowflake it's not recommended. By data modeling star schema theory, you could just add a column to the fact with the unique identifier of the emp role that you can reach from contract from example before loading the model. That way you don't need relationships between emp role and client or emp role by contract. You can just have emp role with the fact directly.

I hope that helps, it's a lot to explain about how to handle different scenarios when doing data modeling and the answer usually is "it depends".


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

Happy to help!

LaDataWeb Blog

View solution in original post

1 REPLY 1
ibarrau
Super User
Super User

Hi. Unless you need to check fact numbers of EmpRoles exactly by client or by contracts, the snowflake it's not recommended. By data modeling star schema theory, you could just add a column to the fact with the unique identifier of the emp role that you can reach from contract from example before loading the model. That way you don't need relationships between emp role and client or emp role by contract. You can just have emp role with the fact directly.

I hope that helps, it's a lot to explain about how to handle different scenarios when doing data modeling and the answer usually is "it depends".


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

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.