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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi all
Hope someone can help.
The data which I retrive from API call contains three properties such as hasMore, items and errors.
hasMore will be true if there are more items to be returned, items will contain an array of the type of data requests.
Each of them has data inside it for example: hasMore signifies whether the pages contains more data or not so its always
be either True or Fale. Currently, I have a query which pulls in the data by definite page number so currently it set
to page 50 so query runs for page 50. Each pages contains 100 rows hence I had to go through each pages to retrieve all
data. Below is an simple example code which I use to retrieve
let
Source = Json.Document(Web.Contents("https://cloud.com/api/user?apiKey=c661b7&orderby=name&page=1")),
#"Converted to Table" = Record.ToTable(Source),
Value = #"Converted to Table"{0}[Value],
#"Converted to Table1" = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Ignore),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table1", "Column1", {"id", "name", "utilityCategoryId", "utilityId", "isARec"}, {"id", "name", "utilityCategoryId", "utilityId", "isARec"})
in
#"Expanded Column1"
However, I am looking to see if I can use "HasMore" to retrieve data from multiple pages until query hits HasMore FALSE?
Not sure, if its possible - any help would be appreciated?
Thanks
hi @Sankzpower
Sorry I can't repro the issue on my side, please kindly raise it to the support team for better advice:
https://powerbi.microsoft.com/en-us/support/
hi @v-diye-msft thanks, but this is not an issue sorry. I was asking if we can restrict query run until it hits with fieldname called "False" as stated in above example.
| User | Count |
|---|---|
| 49 | |
| 37 | |
| 33 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 132 | |
| 99 | |
| 56 | |
| 37 | |
| 37 |