cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

In Many-to-Many Relationship, How to Show Records That Exists in Table 1 But Not In Table 2?

Hello power community!

 

I have two tables with a Many-To-Many relationship.

Here is a screenshot of an exmple I made in Excel:

Power BI help.PNG

 

Here is the relation between the two tables:

Table1.VSaccount *-----<>-----* Table2.Account (Many-To-Many WITH Cross-filter set to BOTH)

 

My issue is when I create a table visual in Power BI that have columns from Table1 and columns from Table2, the records that only exists in Table 1 that has no related records on the 2nd table does not show in the result table.

Here is the power BI result example:

Power BI Help 2.PNG

As you can see the account "C" of table 1 did not appear in the resulted table.

 

How can I show it?/How can I include the records that does not have a counter part on the 2nd table?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: In Many-to-Many Relationship, How to Show Records That Exists in Table 1 But Not In Table 2?

Hi , @I_NeedMorePower 

 

According to  your existing description, I am not sure what your problem is.

So I made a sample directly here:

url: https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/EVRW0pGcIDNKgfREBD_g_...

 

After establishing a corresponding many-to-many relationship between tables  ,I create a measure in table A:

Net = CALCULATE(SUM(Table1[Amount]))+CALCULATE(SUM(Table2[Amount]))

 

The results table shown below:

In-Many-to-Many-Relationship-How-to-Show-Records-That-Exists-in.png

 

 

If it doesn't meet your requirement, kindly share your sample data and expected result if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Best Regards,
Community Support Team _ Eason
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

1 REPLY 1
Highlighted
Community Support
Community Support

Re: In Many-to-Many Relationship, How to Show Records That Exists in Table 1 But Not In Table 2?

Hi , @I_NeedMorePower 

 

According to  your existing description, I am not sure what your problem is.

So I made a sample directly here:

url: https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/EVRW0pGcIDNKgfREBD_g_...

 

After establishing a corresponding many-to-many relationship between tables  ,I create a measure in table A:

Net = CALCULATE(SUM(Table1[Amount]))+CALCULATE(SUM(Table2[Amount]))

 

The results table shown below:

In-Many-to-Many-Relationship-How-to-Show-Records-That-Exists-in.png

 

 

If it doesn't meet your requirement, kindly share your sample data and expected result if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Best Regards,
Community Support Team _ Eason
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

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