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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Sauqiramo
New Member

Power BI is creating duplicate entries

I have 2 data sources from Excel for my report connected with a Many to many relationship on one of the columns (Client Name). When I try to visulise the data in a table and I select fields from both my sources Power BI created duplicate entries with the total combination of whatever the duplicated sources are.

 

For exampled my first data source looks like this:

Client        Start Date

Client 1     01/01/2022

Client 1     01/02/2022

Client 2     10/01/2022

 

My second data source looks like this:

Client       Project                    Project Type

Client 1    Client 1 Project 1    Project Type A

Client 1    Client 1 Project 2    Project Type B

Client 2    Client 2 Project 1    Project Type A

 

However when I create a report and insert a table with data fields from both sources it looks like the following:

Client       Start Date       Project                    Project Type

Client 1    01/01/2022    Client 1 Project 1    Project Type A

Client 1    01/01/2022    Client 1 Project 1    Project Type B

Client 1    01/02/2022    Client 1 Project 2    Project Type A

Client 1    01/02/2022    Client 1 Project 2    Project Type B

Client 2    10/01/2022    Client 2 Project 1    Project Type A

 

Does anyone know why this is happening and how to stop it?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sauqiramo ,

 

This is because you have multiple [start date] for a single client in Table A. When you put the [start date] to Table B, Power BI cannot determine which date this client corresponds to. In this case you will need to add an index column for both tables and use the index column as a one to one relationship instead.

 

Best Regards,

Jay

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Sauqiramo ,

 

This is because you have multiple [start date] for a single client in Table A. When you put the [start date] to Table B, Power BI cannot determine which date this client corresponds to. In this case you will need to add an index column for both tables and use the index column as a one to one relationship instead.

 

Best Regards,

Jay

Hi Jay thanks for answering, I'm still pretty new to BI so apologies if this is an obvious question, but what data would I be putting in the index columns?

Anonymous
Not applicable

Hi @Sauqiramo ,

 

If the order of the data in the two tables is one-to-one, you can directly add the index column in the Power BI Editor.

If not, you could create a rank column in both tables based on the date and project columns for each Client. Then use this rank column as relationship.

rank = TableA[client]&"_"&RANKX(FILTER('TableA','TableA'[client]=EARLIER('TableA'[client])),'TableA'[date],,ASC)

rank = TableB[client]&"_"&RANKX(FILTER('TableB','TableB'[client]=EARLIER('TableB'[client])),'TableB'[project],,ASC)

 Capture.PNG

 

Best Regards,

Jay

mh2587
Super User
Super User

Change the relatioship to one-to-many

then check it


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Power BI wont let me chose one-to-many as there are multiple entries on both data sources.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.