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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Count and Distinctcount broken when Many to Many relationship Exist

I have a table containing Person ID and criminal registration. Sometimes one person can have two registrations. This table is then connected to a crime occurance table which details when a crime occurs and also holds the Person ID element. These end up being a many to many relationship. The relationship seems to make the function count and distinct count be incorrect.

 

When I do not link and perform the funcitons on the Registration table I get a count of 1,222,890 and a distinct count of 1,002,856. Once I turn on the relationship the number becomes about 500,000 and is identical for both counts. How can I fix this error?

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

So many-to-many relationships are generally not a good data model. I would recommend by starting with creating a bridge table between the two tables in question.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I have created the bridge table and allowed filtering to go both ways, otherwise it still wasn't working the way I needed. So I guess that leaves me with two questions. I have three tables, all are now 1 to many and both connections have cross filtering enabled. Will this have a negative impact on my visuals? Secondly how do I know if my visuals are correct? I have about 8 million rows of data so verifying seems a bit difficult to me.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.