Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Refresh a query after an other one has finished

Hello the community,

 

I come to you today with a twisted issue. I was not sure if I should create the topic in Power Query or in Service category but here we are !

For one of my datasets I send queries to a REST API that is limited in count of queries I can send per minute (max 60 queries per minut).

In my case, two distinct tables sends 55 queries each. So as long as I refresh only one table at a time in the PBI desktop there is no problem. But in the Service, I can't separate the refresh of this tables so the execute queries simultaneously and the limit of the API is reached and nothing gets refreshed.

I managed dealing with it adding a delay of 2 seconds between each query but it is extremely annoying when working on the desktop and being forced to wait and wait and wait and wait all day long each time I change something.

 

So my question is : is it possible in the service to refresh one of the table first, and the other table one minut later ? The solution could be in Power query editor but I have no idea how to do this.

 

Thanks in advance,

Cado

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. This is interesting and weird at the same time ^^. I like it.

If you want to "wait" for something to be solved, you can use Function.InvokeAfter() in Power Query.

Doc: https://docs.microsoft.com/en-us/powerquery-m/function-invoke

There is an amazing example from Chris Webb in his blog 

https://blog.crossjoin.co.uk/2015/04/30/using-function-invokeafter-in-power-query/

In addition, you can always consider dataflows to run individual flows for each table if you need to make the refreshes in different times or something like data.

I hope that helps,

 


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

3 REPLIES 3
jeffshieldsdev
Solution Sage
Solution Sage

You can use Power Automate to orchestrate refreshes concurrently or sequentially.

ibarrau
Super User
Super User

Hi. This is interesting and weird at the same time ^^. I like it.

If you want to "wait" for something to be solved, you can use Function.InvokeAfter() in Power Query.

Doc: https://docs.microsoft.com/en-us/powerquery-m/function-invoke

There is an amazing example from Chris Webb in his blog 

https://blog.crossjoin.co.uk/2015/04/30/using-function-invokeafter-in-power-query/

In addition, you can always consider dataflows to run individual flows for each table if you need to make the refreshes in different times or something like data.

I hope that helps,

 


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

Hi @ibarrau 

 

I thought about using Function.InvokeAfter() to ask the second group of queries to wait 60 seconds before starting but then if I want to refrsh only this table in the desktop I will have to wait one minute each time ^^

 

Maybe data flows will solve my problem, let's get into it 🙂

 

Thanks for your help and have a nice day !


Cado

 

 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors