question

BajeshBalakrishnan-9815 avatar image
0 Votes"
BajeshBalakrishnan-9815 asked DSPatrick answered

Power query looping (list.generate) - Rest Api pagination

Hi all,

Need some help here with Excel Power Query with function LIst.Generate.

I need to call a rest endpoint recursively until no more data is fetched. The issue here is that total number of pages is unknown and there is no next page key available.

I did try List.Generate function based on other posts but did not succeed, as it was giving me N number of records as the exit condition was not getting satisfied. ( [Results] <> null ).

Would really appreciate if you could give me a sample LIst.Generate function with api call being used.

Note : Attached screenshot shows the results of calls being made to api. There are 3 records, First call fetch 2 records, second call fetches 1 record and the third call is empty.

Thanks in advance.

scr146661-screenshot.jpg


power-query-not-supported
screenshot.jpg (1.6 MiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DSPatrick avatar image
0 Votes"
DSPatrick answered

Power query is not currently supported here on Q&A. The product group for Power Query actively monitors questions over at
https://community.powerbi.com/t5/Power-Query/bd-p/power-bi-services


--please don't forget to Accept as answer if the reply is helpful--


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.