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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
jdbuchanan71
Super User
Super User

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
Anonymous
Not applicable

Hi @Anonymous,

 

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

 

 

 

 

 

jdbuchanan71
Super User
Super User

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

Anonymous
Not applicable

Hello @jdbuchanan71 

 

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

image.png

 image.png

 

@Anonymous 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.

 

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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