Forum Discussion

Anwesh Gangula's avatar
Anwesh Gangula
Iron Contributor
Jun 27, 2018
Solved

Wait until Query is Refreshed

I have a query in my excel which is directly loaded to a Pivot Table. In the connection properties of the Query, I have set the query to refresh on workbook open. And I have done the same thing to the Pivot table. 

I would like to know and customize the order of Refresh. I would like the Query to be refreshed first and then the pivot table. How to achieve this?

 

Note: I did not load the query to a sheet, I loaded the query directly into a pivot table

  • Hi Anwesh,

    Are you using Power Query ?

    If you set the Pivot to refresh on open and not the query then the Pivot Table will trigger the query to refresh and then update the Pivot

8 Replies

  • Anwesh Gangula and @Anjupjose

    I would also suggest going to the properties of the query and uncheck "Enable background refresh" if possible. Depending on the situation, this setting may appear grayed out. But if it isn't, make sure it does NOT have a check mark and git it a try.

     

    To go to the properties, you can open the queries pane on the right-hand side in Excel, and then right-click and choose Properties at the bottom of the menu.

     

    • stevenwm94's avatar
      stevenwm94
      Copper Contributor

      Celia_Alves 

      Would you know why when I do this I get a error? 

      [Expression.Error] The Column "Col;umn2" of the table wasn't found.

       

      I also tried creating a new Excel document and try with a fresh connection (no step added) just loaded the data and unchecked Enabled Background Refresh - Error. When I check it runs perfectly.

       

      Thanks, 

  • Hi Anwesh,

    Are you using Power Query ?

    If you set the Pivot to refresh on open and not the query then the Pivot Table will trigger the query to refresh and then update the Pivot
    • Anwesh Gangula's avatar
      Anwesh Gangula
      Iron Contributor
      Okay, I didn't know that. That's great.
      Does it work even if I have multiple pivot tables from multiple queries?

Resources