let
Source = Table.NestedJoin(Table1, {"Qid"}, Table2, {"Qid"}, "Table2", JoinKind.LeftOuter),
#"Expanded Table2" = Table.ExpandTableColumn(Source, "Table2", {"Doc"}, {"Table2.Doc"}),
#"Reordered Columns" = Table.ReorderColumns(#"Expanded Table2",{"Qid", "Table2.Doc", "Text"}),
#"Sorted Rows" = Table.Sort(#"Reordered Columns",{{"Qid", Order.Ascending}, {"Table2.Doc", Order.Ascending}})
in
#"Sorted Rows"
Yes...though for some reason the joins do not seem to be working...is that what you want?
@sandy666 Yes...though for some reason the joins do not seem to be working...
Hi @alansidmanVBA Code:let Source = Table.NestedJoin(Table1, {"Qid"}, Table2, {"Qid"}, "Table2", JoinKind.LeftOuter), #"Expanded Table2" = Table.ExpandTableColumn(Source, "Table2", {"Doc"}, {"Table2.Doc"}), #"Reordered Columns" = Table.ReorderColumns(#"Expanded Table2",{"Qid", "Table2.Doc", "Text"}), #"Sorted Rows" = Table.Sort(#"Reordered Columns",{{"Qid", Order.Ascending}, {"Table2.Doc", Order.Ascending}}) in #"Sorted Rows"