Forum Discussion
jaryszek
4 years agoSuper User
Upsert Query in power query
Hi Guys, i am looking for equivalent for upsert query like here: https://www.access-programmers.co.uk/forums/threads/append-if-rows-do-not-exists-else-update-if-exists.320254/ Ok user has t...
- 4 years ago
Create one custom column with the logic to select the "right" Color.
Fix the datatypes on the columns. You don't need to return the ID and Animal if they don't change.
If it works, it works.
jaryszek
4 years agoSuper User
What i did as your suggestion is:
let
Source = Excel.CurrentWorkbook(){[Name="TableToCompare"]}[Content],
#"Merged Queries" = Table.NestedJoin(Source, {"ID"}, TableInput, {"ID"}, "TableInput", JoinKind.LeftOuter),
#"Expanded TableInput" = Table.ExpandTableColumn(#"Merged Queries", "TableInput", {"ID", "Animal", "Color"}, {"TableInput.ID", "TableInput.Animal", "TableInput.Color"})
in
#"Expanded TableInput"
and what i got:
And now just create custom columns and check if they are the same?
No better way?
Best,
Jacek