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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Andyr
Frequent Visitor

How to show the data in a many to many with bridge table

Hi, 

 

I've got two tables that are related with a bridge table in the middle to create a many to many relationship. 

The data is coming from different data sources. 

As an example:

Table Foo (From sql server)
   Id
   Name

Table Bar (From excell)
   Id
   Name

 
Table FooToBar (From another excell linking many Foos to many Bars)
   Id
   FooId
   BarId

 

I've set these tables up with relationships.


All I want to currently do is show in a table visual all rows in the Foo table and all rows in Bar table as they are realted by the bridge table as you would in SQL with inner joins relating the data simular to :

select * from @fooToBar ftb
inner join @foo f on f.id = ftb.fooID
inner join @bar b on b.Id = ftb.BarId

I've tried just using the table visual but as soon as I select columns from the 'bar' table I get an error unless I set the column to an agregate such as count.

Is this actually possible in PBI? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Yes,

There is an "old way" and the "new way" to handle this.

Please refer to the following article (you can jump directly to the "new way")

https://www.sqlbi.com/articles/many-to-many-relationships-in-power-bi-and-excel-2016/

 

Michael

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Yes,

There is an "old way" and the "new way" to handle this.

Please refer to the following article (you can jump directly to the "new way")

https://www.sqlbi.com/articles/many-to-many-relationships-in-power-bi-and-excel-2016/

 

Michael

Thanks Michael

The problem was that there was a duplicate Id in one of the tables, once I removed that the solution you pointed me to works a treat. 

 

Cheers

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.