Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hey there.
I'm looking for help for a bit of a complicated problem.
I have a connection to a REST API that returns a pagination variable to send on subsequent API requests to retrieve the next page.
I am trying to loop through the pages and get all the data into PBI desktop but am having trouble doing so with this endCursor variable.
Here's an example response for a call with an "endCursor"(the variable in question) and a "hasNextPage":
Solved! Go to Solution.
HI @Anonymous,
Perhaps you can take a look at the 'GenerateByPage' helper function to create a custom function to iterator and expand records based on the page number:
Helper functions for M extensions for Power Query connectors - Power Query | Microsoft Docs
Regards.
Moonlight
Hi @Anonymous,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
HI @Anonymous,
Perhaps you can take a look at the 'GenerateByPage' helper function to create a custom function to iterator and expand records based on the page number:
Helper functions for M extensions for Power Query connectors - Power Query | Microsoft Docs
Regards.
Moonlight
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |