Forum Discussion

Vampirtc's avatar
Vampirtc
Frequent Visitor
5 years ago
Solved

Problem merging two tables using LEFT Outer join

I would like to merge two tables without creating duplicates in first table. Second table has duplicated IDs, which is what I need.   For example, table 1: ID  Name 1   XX 2   YX 3   YY Table ...
  • v-alq-msft's avatar
    5 years ago

    Hi, Vampirtc 

     

    Based on your description, i created data to reproduce your scenario. The pbix file is attached in the end.

    Table1:

     

    Table2:

     

    You may create a new query with the following m codes in 'Advanced Editor'.

     

    let
        Source = Table.NestedJoin(Table1, {"ID"}, Table2, {"ID"}, "Data", JoinKind.LeftOuter),
        Custom1 = Table.TransformColumns(Source,{"Data",each Text.Combine([Info]," "),type text})
    in
        Custom1

     

     

    Result:

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.