Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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
User | Count |
---|---|
83 | |
74 | |
73 | |
47 | |
36 |
User | Count |
---|---|
113 | |
56 | |
52 | |
42 | |
42 |