Forum Discussion

josectps's avatar
josectps
Regular Visitor
2 years ago
Solved

Compare tables in paralel

Hi everyone,   I have two tables like the below.       And I would like to have them next to each other.  Rows should match each other, but if there is no match then we should leave a bl...
  • AlienSx's avatar
    2 years ago

    hi, josectps use Table.Join but rename columns in one of tables so column names are different and sort both tables by name columns. And no, you can't highlight anything in PQ - create separate column to check the difference.  

    let
        tbl_a = Table.Sort(your_table_a, {"name_a"}),
        tbl_b = Table.Sort(your_table_b, {"name_b"}),
        tj = Table.Join(tbl_a, "name_a", tbl_b, "name_b", JoinKind.FullOuter, JoinAlgorithm.SortMerge)
    in
        tj