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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
ApiTrader
Frequent Visitor

How to handle api rate call limit within a function?

With the following step I invoke a function in order to get more details about a record. My API request, based on a Power Automate Flow, is running into some trouble due to the amount of calls. Now I want to throttle my calls in order to match the rate limit. How can I accomplish that?

Is it possible to count the loops and let the query wait for a specific delay or is it better, to distribute the amount on a timeframe? 

So, I mean something similiar like application.wait with VBA 🤣 Any help is appreciated

#"Invoked Custom Function" = Table.AddColumn(#"Changed Type", "voucher", each if [voucherStatus] <> "unchecked" then funcGetVouchers([id]) else null )
_________________________________________________________

 

(voucherId as text) as table =>

let
url = WebHookTriggerUri,
body = "{""endpoint"": ""vouchers/"&voucherId&"""}",
Parsed_JSON = Json.Document(body),
BuildQueryString = Uri.BuildQueryString(Parsed_JSON),

....

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @ApiTrader ,

 

Sounds like you could use Function.InvokeAfter to delay your requests in accordance with your throttle limit:

https://learn.microsoft.com/en-us/powerquery-m/function-invokeafter 

 

Chris Webb briefly describes its actual usage and an extended enhancement here:

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

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
ApiTrader
Frequent Visitor

Thanks for reply, excatly what I am looking for.

BA_Pete
Super User
Super User

Hi @ApiTrader ,

 

Sounds like you could use Function.InvokeAfter to delay your requests in accordance with your throttle limit:

https://learn.microsoft.com/en-us/powerquery-m/function-invokeafter 

 

Chris Webb briefly describes its actual usage and an extended enhancement here:

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

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.