Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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?
Solved! Go to Solution.
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 @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?
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)
Best Regards,
Jay
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!
Power BI wont let me chose one-to-many as there are multiple entries on both data sources.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
75 | |
54 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
50 | |
43 | |
40 |