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.
Hi All,
I have 2 tables (TABLE1 and TABLE2), that have 1 column(ColumnX) in common. Below are examples of the two tables and what resultant table I need from joining both of them.
TABLE1
COLUMNX | COLUMNY |
1 | A |
1 | B |
2 | A |
3 | B |
TABLE2
COLUMNX | COLUMNZ |
1 | abcd |
2 | efgh |
3 | ijk |
4 | lmno |
I'm trying to find a way to join these tables so that the resultant table looks like .
COLUMNX | COLUMNY | COLUMNZ |
1 | A | abcd |
1 | B | abcd |
2 | A | efgh |
3 | B | ijk |
I can't seem to figure out the correct join to get the desired output.
Thanks
Hi,
Try following M code
let
Source = Table.NestedJoin(TABLE1, {"COLUMNX"}, TABLE2, {"COLUMNX"}, "TABLE2", JoinKind.LeftOuter),
#"Expanded TABLE2" = Table.ExpandTableColumn(Source, "TABLE2", {"COLUMNZ"}, {"COLUMNZ"})
in
#"Expanded TABLE2"
If this solved your problem, please accept as the solution.
Thank you.
Is this M query, a new column, or DAX? You can build them all but they have different verbiage and different uses.
Trying to accomplish this with power query. What approach would you suggest?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |