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

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

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

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
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 244 members 2,989 guests
Please welcome our newest community members: