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

8 Replies
best response confirmed by Anwesh Gangula (Contributor)
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
Okay, I didn't know that. That's great.
Does it work even if I have multiple pivot tables from multiple queries?
It should do, just mark each Pivot as refresh on open
I have a same question, Refresh on open not working in Pivot table .The source data is another sheet in the same workbook and the same got updated by power query from external data source. Powerquery updates ,but not pivot .Any idea why it is not updating after enabling the refresh on open for that pivot table?

@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.



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.




Not sure how the expression error could depend on refresh for the new query. Perhaps you may share query code?

Same answer as @Sergei Baklan. I would have to see where the error is occurring in the query. Are there multiple queries?