Forum Discussion
How to speed up merge in Power Query when use a NestedJoin?
I am merging two queries together in PowerQuery. Below is the m code:
= Table.NestedJoin(#"Calculate Sumif weight of Delivery", {"Delivery.Delivery Level 01"}, Trax, {"Delivery Document"}, "Trax data ship date 7 19-3 20 fbid", JoinKind.LeftOuter)
The merge is taking forever to process...is there anything I can do to speed it up?
5 Replies
- lbendlinSuper User
Just before the merge use the Table.AddKey step to slap indexes onto the fields on both sides of the join.
https://docs.microsoft.com/en-us/powerquery-m/table-addkey
This step is not reachable from the UI, you have to do it manually in Advanced Editor.
- AnonymousNot applicable
Thanks, the match is a many to many so there isn't a unique key in either table. Will that still help? I won't be able to merge on the newly created key.
- lbendlinSuper User
only one way to find out - use the Power Query diagnostics and do some timing tests.