Forum Discussion
szczepaneq
4 years agoRegular Visitor
Merging queries - incorrect value after expand table
Hello, After merging 2 queries, I see that the value is correct and expected in the table view as below: But just after expanding tables I see different value (not match and incorrec...
szczepaneq
4 years agoRegular Visitor
Sure,
let
Źródło = Table.NestedJoin(#"Calesco PO - ilość szt >0", {"PO & PO line ID"}, #"SO OBR - ilość szt >0", {"PO & PO line ID"}, "SO OBR - ilość szt >0", JoinKind.LeftOuter),
#"Przefiltrowano wiersze" = Table.SelectRows(Źródło, each ([Purchase order] = "123744")),
#"Usunięto inne kolumny" = Table.SelectColumns(#"Przefiltrowano wiersze",{"Vendor account", "Purchase order", "PO line ID", "PO & PO line ID", "Delivery date ", "SO OBR - ilość szt >0"})
in
#"Usunięto inne kolumny"
BA_Pete
4 years agoSuper User
Hi szczepaneq ,
Is there a reason why you're doing row filters and column selection before expanding your merge?
I'm not sure whether this would actually cause a problem, but it seems unorthodox to do things this way round.
What happens if you apply this code to a new blank query?
let
Źródło = Table.NestedJoin(#"Calesco PO - ilość szt >0", {"PO & PO line ID"}, #"SO OBR - ilość szt >0", {"PO & PO line ID"}, "SO OBR - ilość szt >0", JoinKind.LeftOuter),
expandMerge = Table.ExpandTableColumn(Źródło, "SO OBR - ilość szt >0", {"PO & PO line ID", "Data dostawy"}, {"PO & PO line ID_2", "Data dostawy_2"}),
#"Przefiltrowano wiersze" = Table.SelectRows(expandMerge, each ([Purchase order] = "123744")),
#"Usunięto inne kolumny" = Table.SelectColumns(#"Przefiltrowano wiersze",{"Vendor account", "Purchase order", "PO line ID", "PO & PO line ID", "Delivery date ", "SO OBR - ilość szt >0"})
in
#"Usunięto inne kolumny"
Pete