Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I don't have a lot of M Query experience, and I'm working on calling all data points for an API call. In order to get where I want, I have to make 2 seperate calls above this (asking for a list of all company projects and a second asking for those project's inspections). The goal is to get all checklist itmes from those inspections.
How can I go through and page to get all data? My current M query looks something like this:
ChecklistItems =
Table.AddColumn(
#"Filtered Rows1",
"New",
each
Json.Document(
Web.Contents(
"https://api.WEBSITE.com/rest/v1.0/",
[
RelativePath =
"projects/"
& Text.From([Project Id])
& "/checklist/list_items?filters[inspection_type_id]=98634",
Query = [
per_page = "1000"
],
Headers = [
Authorization = AuthToken
]
]
)
)
),
Hello @thomazinh ,
This blogpost shows a simple paging semantics and also gives you a solution to not miss the last page when paging in Power Query: How not to miss the last page when paging with Power BI and Power Query (thebiccountant.com)
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries