Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
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)
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!
Solved! Go to Solution.
Could you add a CoCd table to your model and join all the tables into that as well as the Doc Curr table?
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
Could you add a CoCd table to your model and join all the tables into that as well as the Doc Curr table?
Hello @jdbuchanan71
Looks like that cleared it up for me! The values per column and within the filter match correctly.
@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
User | Count |
---|---|
121 | |
76 | |
63 | |
51 | |
50 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |