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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Rose__123
Helper II
Helper II

Many to many relationship - why?

Hi

I don't understand why this becomes a many-to-many relationship? Commission_exeption_table[customer_code] contains no repetitions, but salesInvoices[customer_code] does, I would think it should be a many to one relationship. Both are formatted as text. 

Rose__123_0-1629998001244.png

 

 

1 ACCEPTED SOLUTION

@Rose__123 The only way that I could replicate this was to have a blank row in Commission_exception. A blank customer_code. Do you have that?



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...

View solution in original post

8 REPLIES 8
Greg_Deckler
Community Champion
Community Champion

@Rose__123 Check casing. M does not consider a and A the same but DAX does.



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...

@Greg_Deckler, I double-checked, but it was fast since my Commission_exeption_table only contains two rows.  Any other ideas?😅 The only thing I can think of is the blank spaces of the Commission_exeption_table since these also appear (and should appear) in the salesInvoices[customer_code], but can that be? 

@Rose__123 It's really difficult to say without the ability to see the data. Since it is only two can you make up two that are equivalent to your two ID's? Is the only difference the number of spaces or ?



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...

@Greg_Deckler sure! So right now they are like this:

 Commission_exeption_table

customer_code  Commission
1234562
123456783

 

and

 

 salesInvoices

DueDate   customerPurchaseOrderReference   CustomerID   customer_code
01-01-01335534-435643-3456112345678
02-02-01135534-435643-34561212344
02-02-01535534-434343-345623AB123
03-03-03435534-435213-3456432112345678

@Rose__123 Are both of your columns set to Text? Because if they are not, nothing will match.



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...

@Greg_Deckler, yes both are formatted as text

@Rose__123 The only way that I could replicate this was to have a blank row in Commission_exception. A blank customer_code. Do you have that?



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...

@Greg_Deckler, well not anymore 😂 It works, thank you very much for your time!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors