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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Backfill Row Values to 0

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:

SamBerger_1-1595501905190.png

 

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

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

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





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


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

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





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


Anonymous
Not applicable

Perfect, exactly what I was after. Many thanks!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.