Power Query Merging on Null values

Viewed 2984

I was very surprised to find out that Table.NestedJoin joins columns join on null. This seems like the wrong choice to me, but the compiler is always right. In the example below, Table1 and Table2 (which are otherwise identical) are left joined by ID.

enter image description here

let
    Source = Table.NestedJoin(Table1,{"ID"},Table2,{"ID"},"Table2",JoinKind.LeftOuter),
    #"Expanded Table2" = Table.ExpandTableColumn(Source, "Table2", {"ID", "Index"}, {"Table2.ID", "Table2.Index"})
in
    #"Expanded Table2"

My question is: are there any known best practices to get joins to behave more like standard SQL joins (where null <> null).

This is, of course, beyond the simple method of FIND/REPLACE null with special thing that no one could possibly use in arbitrary data...that someone will have inevetably used in arbitrary data.

Thanks in advance for any help.

0 Answers
Related