Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Help on consolidating load, filter and merge step together using M language

I tried to simply merge/inner join two big tables(one has 300,000+ rows after filtering and the other has 30,000+ rows after filtering) in PQ. However, for this simple join operation, PQ took at least 10 minutes (I killed the Query Editor after 10 minutes' processing) to load the preview.
Here's how I did the join job: I first loaded tables into the workbook, then did the filtering for each table and at last, used the merge function to do the join based on a same field.
Did I do anything wrong here? Or is there any way to improve the load efficiency?
P.S. no custom SQL was used during the process. I was hoping the so called "Query Folding" can help speed the process, but it seems it didn't work here.

 

I've already solved the problem by consolidating load, filter and merge step together using M language.  Now the preview can be loaded in seconds.

 

Above scenario happen in https://social.technet.microsoft.com/Forums/en-US/370d14de-a861-49ab-9bc4-102b9769bcd2/tablejoinmerge-in-power-query-takes-extremly-long-time-to-process-for-big-tables?forum=powerquery where OP solve his question. But mine is to pull data from sharepoint. I have no idea how to consolidating load, filter and merge step together using M language. Any Help is appreciated.