We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Scenario: I’m looking to get data from the Workplace Graph API. Workplace is owned by Meta and the API allows for a subset of functionality of the Graph API from Facebook.
I was able to pull 25 records but I’m currently stuck at pagination to get more results.
Here’s the paginated results link from the documentation
Problem: I’m still very new to PQ advanced editor and M code so I’m not sure how to code the pagination using the documentation provided. For example, the maximum number of results we get back for members is 25 if I remove the limit.
Current Code:
let
#“BaseURL” = “https://graph.facebook.com/community/”,
#“limit” = 5,
Source = Json.Document(
Web.Contents(
#“BaseURL”,
[
RelativePath = “members”,
Query =
[
limit = Text.From(#‘limit’),
],
Headers=[
#“Authorization” = "Bearer " & #“Header”,
#“content-type” = “application/json”
]
]
)
)in
Source
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 7 | |
| 7 | |
| 5 |