- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Creating Loop in Power Query and API
Hi,
I'm connecting to an API which have a 500 row limit. There are separate columns in the returned json that states how many rows there are in the current search, and how many there are in total (see screenshot below)
I have read through posts like this:
https://community.powerbi.com/t5/Desktop/how-to-create-a-query-that-paginates/td-p/20047/page/8
But cannot find a solution on how to implement the suggested solutions in the post into my scenario.
I can set the limit and offset in the API URL with limit=500&offset=500 (500 would be for the second loop) manually, and it would give me the correct results. But I obviusly want it to loop through the search until the total rows avaliable limit has been reached..
Any help would be appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Please see this video. It walks through how to do this by first creating a list of numbers/offsets.
Power BI - Tales From The Front - REST APIs - YouTube
Pat
Did I answer your question? Mark my post as a solution! Kudos are also appreciated!
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypa HoosierBI on YouTube
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thanks, worked like a charm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Please see this video. It walks through how to do this by first creating a list of numbers/offsets.
Power BI - Tales From The Front - REST APIs - YouTube
Pat
Did I answer your question? Mark my post as a solution! Kudos are also appreciated!
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypa HoosierBI on YouTube

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
10-02-2024 10:54 PM | |||
10-03-2022 03:04 AM | |||
05-03-2024 08:48 AM | |||
08-24-2022 06:49 PM | |||
03-07-2024 02:17 PM |
User | Count |
---|---|
28 | |
27 | |
25 | |
14 | |
10 |
User | Count |
---|---|
24 | |
21 | |
16 | |
16 | |
10 |