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! Get ahead of the game and start preparing now! Learn more
Edit: I cant just delete the bottom row, than it wont show me anything
Hello everyone, i have working code. Only the last record in the column with records i recieve is an error. I believe this to be because the the api is entirely loaded and the last row gives an empty record. So i get 218 rows in a column which i can expand with my data but the last row is an error row 219. I can do all my fixing in query editor but when i load it it says end of buffer reached. How do i fix this?
= let
CurrentPage = 0,
url = "*",
headers = [
#"Authorization" = "Bearer *,
#"Content-Type" = "application/json; charset=utf-8"
],
getDataForPage = (page) =>
let
response = Json.Document(Web.Contents(url & Text.From(page), [Headers=headers])),
data = response
in data,
Loop = List.Generate(
() => CurrentPage,
each List.Count(getDataForPage(_)) > 0,
each _ + 1,
each getDataForPage(_)
),
combinedData = Table.FromList(List.Combine(Loop), Splitter.SplitByNothing())
in
combinedData
HI @lexdekrijger,
I'd like to suggest you add a condition after the "List.Count(getDataForPage(_)) > 0" to check if the current page has large or equal to the end page to skip the function calculate with wrong parameters.
Regards,
Xiaoxin Sheng
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |