Forum Discussion
Required Pagination support from Power BI
Hi shubhj123
I don't know if there is a Next button but you can create a function, this lets you effectively loop the api.
Set up the connection once.
Create a parameter (or two) for the start number which presumably here is the offset.
Set that to 5000 when you create it.
Modify the M row of source so it is something like:
"/2/0/models?offset=0&limit=5000 and 2/0/models?offset=" & parStart & "&limit=5000"
This lets the offset be equal to the parameter, check that works.
Now right click the query and choose create function
Give it a name like fnLoopPages
Using Enter Data or by importing an excel sheet create a list of the number of rows to loop.
5000, 10000, 15000, 20000 etc
On the Add Column tab choose Invoke custom function
This will ask you which function to use, then a list will appear asking you to populate the parameters
Choose your column containing the Number column (repeat for any other parameters you created)
You should now see a new column with an expand option.
This shows you which columns the api will return, untick the ones you dont want.
Let the query run and it will append all the rows
Delete the initial number column
Enjoy!