cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Microsoft
Microsoft

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
Microsoft
Microsoft

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
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors