cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Left joins generate duplicate values issue

Hello,

 

I am trying to join two tables with a left join UNITS (left table) and TENANT(right table) tables. After the join I am extending the values I want to add in my table and they extend with no problem. The problem is that for some reason new rows are being added in my table and I receive an error message for duplicate ID (primary key) values as a result of the raws addition. Please see a screenshot of this message below.

index issue.PNG

 

Can you please support with this? 

 

Many thanks,

MariosChr90

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IX
Super User IX

Re: Left joins generate duplicate values issue

The issue is that you are likely extending a column that then generates a duplicate row for 99. So, you can imagine how this might happen. When you join the tables, you are aggregating multiple rows from TENANTS for "99" to a single row. But, when you expand the aggregation, you end up with multiple rows of 99 and hence you are getting an issue with your relationship.


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Highlighted
Super User IX
Super User IX

Re: Left joins generate duplicate values issue

The issue is that you are likely extending a column that then generates a duplicate row for 99. So, you can imagine how this might happen. When you join the tables, you are aggregating multiple rows from TENANTS for "99" to a single row. But, when you expand the aggregation, you end up with multiple rows of 99 and hence you are getting an issue with your relationship.


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Highlighted
Anonymous
Not applicable

Re: Left joins generate duplicate values issue

Yes I see, I have resolved the issue. I just remove manually the one duplicate value of '99'.

 

Many thanks for the support!

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors