Forum Discussion
Slice two tables by multiple common columns
No need to create 3 different bridge tables. Just create one bridge table with 3 columns plus a key to the different combinations held in the bridge and the same corresponding keys in the 2 tables. All you need is use a bit of Power Query to reshape your data - get rid of the 3 columns in A and B, and instead add a column with a key to the bridge table's correct combination. Then connect the bridge to A and B on the new columns with keys and you're done.
- DJBAJG5 years ago
Helper IV
Tell me more about creating a key. Would I concatenate the 3 common values into a column on the fact tables and on the bridge table and us that column to create the relationship?
- Anonymous5 years agoNot applicable
Why would you want to create a key that would be text? Keys are and should always be integers due to speed reasons (rarely GUIDS). If you only have unique combinations of 3 fields in a table (and they should be unique since it's going to be sort of a junk dimension), each such combination can be assigned an integer key. Then you should use this key in other tables. Creating such a table and assigning integer key, then placing them in the related tables is pretty easy in Power Query.
- DJBAJG5 years ago
Helper IV
Based on my previous response you can see that I'm new to the concept in general. Are you able to provide an small example of the query I would need to execute this so I can better understand the idea behind it and learn by expanding it to meet me needs? My DAX is weak and my M is non-existant. LOL