+ Reply to Thread
Results 1 to 2 of 2

Power Query refresh order

  1. #1
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Harrisburg, PA
    MS-Off Ver
    Office 365 MSO (16.0.10730.20264) 32-bit
    Posts
    160

    Power Query refresh order

    Hi All.
    I found in power query for excel, that if a source query runs sql to pull data (connection only), and that source is used by multiple other querys, the source runs each time it is needed... it appears that it the results are not loaded into memory. Just so happens that in PowerBI, it seems to only pull the source once - same querys run faster in powerbi vs excel. I also remember reading something about the difference of running in powerbi vs excel.

    To speed up the querys, I load the source sql results to a sheet instead of connection only... then have the later queries pull the data from the loaded sheets. This make it run faster.

    In the past, I have written custom vba code that refreshes the queries based on their names. I name the source queries that run and load to local sheets starting with "00)". Then I have my code refresh all "00)" queries first, then refresh all others.

    So.... do I really need to do the refresh with the custom code or will PQ know and do it for me.

    Thanks.
    Steve
    Harrisburg, PA USA

  2. #2
    Forum Contributor
    Join Date
    11-05-2019
    Location
    Tiki Island, TX
    MS-Off Ver
    Office 365
    Posts
    168

    Re: Power Query refresh order

    In my experience with PowerQuery it is difficult to tell which query it will decide needs to automatically run and which need to be mandated in code when trying to speed up the process. The problem is if you put in code to update a query and then update another query that PQ decides needs to refresh that query again it will run twice. My solution has been to determine which is the highest level query I am going to need to run. With all sources already refreshed open the data and queries pane, go to that highest level query and manually refresh from there. Watch what queries refresh automatically. DON'T refresh in code those that PQ determined needed to update as that will cause it to update twice and slow down rather than speed up.
    If I was able to help you, you can thank me by clicking the Add Reputation button below and marking the thread Solved.

+ 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. Power Query Refresh & SUMIFS
    By gaffney in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-15-2021, 05:16 AM
  2. Power Query - Refresh Preview
    By AllisterB in forum Excel General
    Replies: 1
    Last Post: 05-14-2021, 12:12 AM
  3. Excel Power Query Refresh or Access Query - 2nd Query Run is faster
    By Steveapa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-03-2020, 10:16 AM
  4. Refresh all Power Query Pivots performing only 1 Query and stops
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-04-2019, 04:49 AM
  5. Power Query Refresh Order
    By Steveapa in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-20-2019, 11:02 PM
  6. Power Query - How to refresh queries?
    By ypurcaro in forum Excel General
    Replies: 11
    Last Post: 02-11-2019, 06:47 PM
  7. code to refresh power query not working ..
    By Hassan1977 in forum Excel General
    Replies: 0
    Last Post: 08-31-2016, 12:31 PM

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