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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Pp110784
Helper II
Helper II

Not able to join data from 2 tables in my report

I have an existing Power BI report which is pulling data from 1 table (let's say table A). I have made quite a few modifications to the data to create that report. So I've added a lot of measures and some columns to arrive at the report that I have today.

Now I need to add some data into that report from a different table (let's say table B). The join between these 2 tables is a plan_id column with many to many cardinality. I added the new table and established that relationship in the data model.

Sample Table A data - 

Plan Sponsor NamePlan Sponsor SourcePlan IDPlan NamePlan SourceInvestment NameInvestment SourceEffective dtPlan Filing dt
ABCA11Plan 1AInvestment 1.1A12/31/202012/31/2020
ABCA11

Plan 1

AInvestment 1.2A01/31/202101/31/2021
ABCA11Plan 1AInvestment 1.3B01/31/202101/31/2021
ABCA11Plan 1AInvestment 1.4B01/31/202101/31/2021
ABCA11Plan 1AInvestment 1.5C02/28/202202/28/2022
ABCA11Plan 1AInvestment 1.6C02/28/202202/28/2022
ABCA21Plan 2BInvestment 2.1B12/31/202012/31/2020
ABCA21Plan 2BInvestment 2.2B12/31/202012/31/2020
ABCA21Plan 2BInvestment 2.3B12/31/202012/31/2020
CDEA31Plan 3BInvestment 3.1B12/31/202012/31/2020
CDEA31Plan 3BInvestment 3.2B12/31/202012/31/2020
EFGC41Plan 4CInvestment 4.1C01/31/202101/31/2021
EFGC41Plan 4CInvestment 4.2C01/31/202101/31/2021
GHIB51Plan 5AInvestment 5.1B01/31/202101/31/2021
GHIB51Plan 5AInvestment 5.2A01/31/202101/31/2021
GHIB51Plan 5AInvestment 5.3C02/28/202202/28/2022
PWI1A6PWIP1B  01/31/202103/31/2023
PWP2B7PWIP2B  02/28/202202/28/2023

 

Table B has information about plan service providers for the plans in Table A. 

Sample Table B data - 

 

Plan IDService Provider NameProvider Role
11Provider1Role 1
11Provider1Role 2
11Provider2Role 2
11Provider2Role 3
11Provider3Role 4
11Provider3Role 5
21Provider1Role 1
21Provider 4Role 2
21Provider3Role 3
31Provider1Role 1
31Provider1Role 2
41Provider3Role 1
41Provider 4Role 2
51Provider2Role 2
51Provider2Role 3
51Provider2Role 4

 

So I added another page to the report with plan name & its corresponding plan service providers.  But the table did not show the data from Table B:

Pp110784_2-1718314142803.png

When I looked at the data model I saw the following error:

Pp110784_1-1718314026953.png

Can somebody please help me with this?

Changing the existing query for table A to join it with table B will make my report too big (~18M rows), so I don't want to do that. Also, as I mentioned earlier, I have made quite a few changes to the data from table A, so if I change that query now, it is messing up my report big time as all the columns that I added in power BI are getting lost.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Pp110784 ,

Based on the error description, try to review the relationship. Besides, review the query process.

You can view the following document to learn more information.

Solved: how to resolve Power BI error - the key didn't mat... - Microsoft Fabric Community

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Pp110784 ,

Based on my testing, please try the following methods again:

1.Create the simple tables.

vjiewumsft_0-1718345302723.png

vjiewumsft_1-1718345317446.png

2.Create the relationship between the two tables.

vjiewumsft_2-1718345514395.png

3.Drag the plan name and plan service providers into the table visual. The result is shown below.

vjiewumsft_3-1718345526898.png

Besides, try to check the relationship and column data.

You can also view the following documents to learn more information.

Many-to-many relationship guidance - Power BI | Microsoft Learn

Many-to-many relationships in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

That's what I'm doing now. It's not working. If you can let me know what might be the probable causes of the error ' The key didn't match any rows in the table.', that will help. Thanks!

Anonymous
Not applicable

Hi @Pp110784 ,

Based on the error description, try to review the relationship. Besides, review the query process.

You can view the following document to learn more information.

Solved: how to resolve Power BI error - the key didn't mat... - Microsoft Fabric Community

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

My problem was similar to this. Somehow the first query that I had used in my report to pull data was not working properly. It was not referencing the table with it's name, instead as 'Query1'. So I had to edit the query and pull the data again. This time I saw the table was being referenced with it's table name. Then I joined the 2nd table with it and it worked fine. Had to re do my report because of it, but at least we won't face any issues in the future because of this.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors