Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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 following code works fine and could get all data from the source. Yet, it is unable to refresh on PowerBI web.
let
iterations = 150,
url = "https://sjc1.qualtrics.com/API/v3/mailinglists/mailing-list-id/contacts/",
FnGetOnePage = (url) =>
let
Source = Json.Document(Web.Contents(url, [Headers=[#"X-API-TOKEN"="token here"]])),
data = try Source[result][elements] otherwise null,
next = try Source[result][nextPage] otherwise null,
res = [Data=data, Next=next]
in
res,
GeneratedList =
List.Generate(
()=>[i=0, res = FnGetOnePage(url)],
each [i]<iterations and [res][Data]<>null,
each [i=[i]+1, res = FnGetOnePage([res][Next])],
each [res][Data]),
GeneratedList1 = GeneratedList{0}
in
GeneratedList1
I tried to change the code to use RelativePath method instead for getting source data so to see if it could be refreshed on PowerBI web but I found that it cannot obtain all the data from the source as the above method does.
let
iterations = 150,
url = "https://sjc1.qualtrics.com/",
FnGetOnePage = (url) =>
let
Source = Json.Document(Web.Contents(url, [RelativePath="API/v3/mailinglists/mailing-list-id/contacts/?skipToken=", Headers=[#"X-API-TOKEN"="token-here"]])),
data = try Source[result][elements] otherwise null,
next = try Source[result][nextPage] otherwise null,
res = [Data=data, Next=next]
in
res,
GeneratedList =
List.Generate(
()=>[i=0, res = FnGetOnePage(url)],
each [i]<iterations and [res][Data]<>null,
each [i=[i]+1, res = FnGetOnePage([res][Next])],
each [res][Data]),
GeneratedList1 = GeneratedList{0}
in
GeneratedList1
I would like to ask what further modification is needed to allow PowerBI to get all data from the source normally.
Thank you.
Hi @makpaul , Let us reach out to @ImkeF - she is a whiz at m language!
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.