This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi all,
I'm pulling some data out of an API that retrieves data in 100 row pages. Using this technique I've been able to loop through all the pages and retrieve all the data in a single table, which is awesome. My only issue is that the number of pages will obviously increase over time and I would like to automate things.
I can query the API header to get the number of current pages and can wrangle the data so I end up with a table with the single value of the number of pages:
Can anyone suggest how I might convert this to a table that starts at 0 and then ends on whatever the number in this table is? So in this example there would be 47 rows filled with the values 0 - 46. I can then use this list to run the function as described in the aforementioned link.
Thanks in advance,
Sam
Solved! Go to Solution.
If you drill down on your shown step to get the totalpages value, you can just use = {0..totalpages-1} to make that list, convert it to a table, make it a text column and concatenate it into your API call.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
If you drill down on your shown step to get the totalpages value, you can just use = {0..totalpages-1} to make that list, convert it to a table, make it a text column and concatenate it into your API call.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Perfect, exactly what I was after. Many thanks!
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.