cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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.


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

Putting square pegs in round holes since 1972.

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.


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

Putting square pegs in round holes since 1972.

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
Meet the 2020 Season 2 Power BI Super Users!

Meet the 2020 Season 2 Power BI Super Users!

Find out who's part of the program this season, and welcome the new Super Users.

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Top Solution Authors
Top Kudoed Authors