cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Striggs Frequent Visitor
Frequent Visitor

Unable to link a bridge table to multiple tables which each share the same column info

Hello All,

 

I'm having quite a bit of problems while trying to create a table with many-to-many relationships between various tables. These tables are only related to each other by 2 columns (Currency and Comp. Code). Ultimately, I would like to have a table filtered by Comp. code (seen on left) and aligned as seen below by currency (1st col.), with additional columns for amounts coming from each different table. In the photo below I filtered by a Comp. code, the 1st column of values (fbl5n..) is correct, but 2nd value column is incorrect and is summing the entire amount for the "AED" currency, as well as the remaining columns.

 

image.png

 

 

In this case I thought that creating a bridge table and making unique values for "Currency" would allow me to create a relationship and see the amounts for each given column, but there is something that I might be overlooking. (Pic Below)

 

 

image.png

 

 

 

Does anyone have any suggestions on what would be best to do in these circumstances? Also, consider that I will still need to add an additional 2-3 columns (will be new tables) with again the only relatable fields being Comp. Code and Currency.

 

Thank you in advance for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: Unable to link a bridge table to multiple tables which each share the same column info

Could you add a CoCd table to your model and join all the tables into that as well as the Doc Curr table?

View solution in original post

4 REPLIES 4
Super User IV
Super User IV

Re: Unable to link a bridge table to multiple tables which each share the same column info

Could you add a CoCd table to your model and join all the tables into that as well as the Doc Curr table?

View solution in original post

Laz Member
Member

Re: Unable to link a bridge table to multiple tables which each share the same column info

Hi @Striggs,

 

From a high level you said that you have only two columns that relate to all other tables that contain numerical attributes which are (1) Currency & (2) Comp. Code.

 

Why have a Bridge Table, especially when you would want these Dimesnion attributes (Currency & Comnp. Code) to be used as filters. Instead create two new dimensions which will be called: (1) Dim Currency & (2) Dim CompCode. This will make your model more undertanding and clear, as now you have two Dimesnion Tables that can be used as filters and are not called 'Bridge'. Also, this will resolve the M:M issue.

 

Can you please try the above, therefore create those two dimesnions, then add the attributes of those two dimesnions in the Filter Pane and use them as so. If i understoof correctly this will resolve your issue. 

 

I can look into this in more detail tomorrow.

 

Laz

 

 

 

 

 

Striggs Frequent Visitor
Frequent Visitor

Re: Unable to link a bridge table to multiple tables which each share the same column info

Hello @jdbuchanan71 

 

Looks like that cleared it up for me! The values per column and within the filter match correctly.

image.png

 image.png

 

@Laz In this case I only needed to filter by company code, but the values on the table should be based on the currency.

 

Would this be considered best practice when you only have tables available to use with this many-to-many relationships? I know if possible it is better to avoid having a large amount of data in this way if you can.

 

 

Super User IV
Super User IV

Re: Unable to link a bridge table to multiple tables which each share the same column info

It is, yes. Your model should be made up of long and narrow fact tables and wider but much shorter lookup (bridge) tables.  Tables like Dates / Employees / Locations / Currency / Company Code / Customers.  Then you add attributes of say company code into that lookup table.  Maybe things like Company Currency / COA / Language

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors