Forum Discussion
ErikPettersson
8 years agoFrequent Visitor
Supertricky modelling..
Hi! I'm encountered a bit of trick problem and would be open to suggestions how to work around it. I have 2 tables (see below) that I need to match. However, the only common denominater contains ...
- 8 years ago
Hi ErikPettersson,
Based on my test, we can merget the two tables in power query based on the column ID B.
Here is the M code for your reference.
let Source = Table.NestedJoin(Table1,{"ID B"},Table2,{"ID B"},"Table2",JoinKind.LeftOuter), #"Expanded Table2" = Table.ExpandTableColumn(Source, "Table2", {"ID A"}, {"Table2.ID A"}) in #"Expanded Table2"For more details, please check the pbix as attached.
https://www.dropbox.com/s/f0d3fd6xaafy2n6/merge.pbix?dl=0
Regards,
Frank
v-frfei-msft
8 years agoCommunity Support
Hi ErikPettersson,
Based on my test, we can merget the two tables in power query based on the column ID B.
Here is the M code for your reference.
let
Source = Table.NestedJoin(Table1,{"ID B"},Table2,{"ID B"},"Table2",JoinKind.LeftOuter),
#"Expanded Table2" = Table.ExpandTableColumn(Source, "Table2", {"ID A"}, {"Table2.ID A"})
in
#"Expanded Table2"For more details, please check the pbix as attached.
https://www.dropbox.com/s/f0d3fd6xaafy2n6/merge.pbix?dl=0
Regards,
Frank
- v-frfei-msft8 years agoCommunity Support
Hi ErikPettersson,
Does that make sense? If so, kindly mark my answer as a solution to close the case.
Regards,
Frank