Forum Discussion

Pp110784's avatar
Pp110784
Icon for Helper II rankHelper II
2 years ago
Solved

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:

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

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.

4 Replies