+ Reply to Thread
Results 1 to 7 of 7

Power Query Merge: Expand Column loads 200 MILLION+ records?

  1. #1
    Registered User
    Join Date
    11-22-2019
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    8

    Unhappy Power Query Merge: Expand Column loads 200 MILLION+ records?

    Hello -

    Once again, I seem to find new and exciting issues with power query. I've searched high and low, but I haven't had any luck... I'd love to know the inner working of power Query that causes the following issue:

    Setup:
    I have two tables (just tables, no external connections) as the source for two queries:

    Query A has about 100k records and only two columns.
    Query B has about 700k records and four columns.

    There is a common column between the two that I am using to merge (Left Outer - All from Query A and Matching from Query B). My expected result is 100k rows, since I only want to get the rows from Query B that match Query A.

    The merge itself is fine (expected 100k records) in about 10 seconds, but when I try to expand the table (Query B) to only add one column (for a total of three columns, two from Query A and one from Query B) and then load the result of the query....

    It goes and goes and goes... I've never actually let it all load, since I get impatient after 45 minutes and 200 MILLION records....

    Any idea why simply expanding one column for the matching records in Query/Table B is causing Power Query to try and load hundreds of millions of records?


    Thanks to anyone who can help me understand!

    - Dave
    Last edited by Trioptre; 11-19-2021 at 08:36 PM.

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Power Query Merge: Expand Column loads 200 MILLION+ records?

    Hi,

    Re

    Quote Originally Posted by Trioptre View Post
    but when I try to expand the table (Query B) to only add one column (for a total of three columns, two from Query A and one from Query B) and then load the result of the query....
    it might be more useful not to lump those two actions into one, and instead to clarify whether it's the load which takes up all the time or whether you also experience a delay in the table expansion.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    11-22-2019
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: Power Query Merge: Expand Column loads 200 MILLION+ records?

    Hi XOR LX -

    Thanks for your input! The delay only happens when I try to expand the merged table (just one column) which is the whole point of the merge. I need to expand the merged table in order to actually view the matched data...

    Any thoughts?

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Power Query Merge: Expand Column loads 200 MILLION+ records?

    I can't reproduce your issue. I created a set-up which mimics the one you describe, with identical numbers of rows in each query, and the expansion was near instantaneous.

    This may only be solvable by seeing the actual workbook, though perhaps someone else on this forum will be able to resolve this for you without going down that road.

    Regards

  5. #5
    Registered User
    Join Date
    11-22-2019
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: Power Query Merge: Expand Column loads 200 MILLION+ records?

    Thanks again, XOR LX -

    Just a couple of clarifications.. From my original post:

    Query A has about 100k records and only two columns.
    Query B has about 700k records and four columns.

    (they do not have the same number of rows)

    when I try to expand the table (Query B) to only add one column (for a total of three columns, two from Query A and one from Query B) and then load the result of the query....

    (The expand within the power query editor is fine (Since it's only the first 1000 row preview). Loading the results of the query into a table is where it takes hours and tries to load hundreds of millions of rows...

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Power Query Merge: Expand Column loads 200 MILLION+ records?

    Apologies, I see that "with identical numbers of rows in each query" was misleading. I meant identical numbers to those that you are using.

    I also loaded the data into a worksheet table near instantantaneously.

    Regards

  7. #7
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Power Query Merge: Expand Column loads 200 MILLION+ records?

    You should transform your table into a list.

    See this video:
    https://www.youtube.com/watch?v=nJ7LzwiSwnw

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Display Duplicate Records using Power Query
    By alansidman in forum Tips and Tutorials
    Replies: 1
    Last Post: 07-14-2021, 12:48 PM
  2. Replies: 8
    Last Post: 10-21-2020, 03:02 AM
  3. Unable To Expand XML Table In Excel Power Query Editor
    By alteredstate in forum Excel General
    Replies: 3
    Last Post: 09-12-2020, 06:20 AM
  4. Replies: 3
    Last Post: 04-25-2020, 09:46 AM
  5. Power query merge column
    By Eric Tsang in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-17-2020, 09:08 AM
  6. [SOLVED] Power Query: Combine records with deliminter
    By misty15 in forum Office 365
    Replies: 4
    Last Post: 09-17-2019, 04:34 PM
  7. Merge data and expand records based on specific criteria
    By TjMc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-11-2015, 07:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1