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.
Hi,
I've created this function:
But I would also like to be able to extract the cursor value separately and use it for my next call(s).
If I try to check on whether the cursor field is empty by doing this check:
each [Result][SalaryCursor] <> null
Many thx once more! Looks promising 👍
Unfortunately haven't had any time today to look further into it and not in the office tomorrow, but I'll apply the changes locally and will keep you posted!
Wkr,
Kris.
Hi @ackerkris , Thank you for the update. Could you please provide ETA (Estimated Time for Arrival) for this thread?
Regards,
Dinesh
Hey Dinesh,
>>The issue you are facing is classic for recursive API calls when a field can sometimes be null or not even exist, Power Query tries to access [Result][SalaryCursor] before it checks if [Result] is null, so it crashes.
I learn new stuff every day 😁. Thx!
You've definitely have helped me a huge step forward and I'm getting now more and good results 🎉
But not 'complete' yet. I have a similar situation like in your example: you have 3 pages and on your 3rd page you have Eve, but she doesn't show up in the end result, while I would expect her also to show up in your case:
What's the best way to make sure that the call effectively (in your case) gets executed 3 times so that it also fetches the data from the last page?
Much obliged already!
Wkr,
Kris.
Hi @ackerkris ,
Please refer below updated pagination logic, Please refer below snap and attached PBIX file.
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
Helloe @v-dineshya ,
Apologies for the late reply, but too many unexpected things came popping up last Thursday & Friday and only now found some time to look into it.
I have created the following function:
GetData_Results_w_cursor_new
So far so good.
Next is a query calling upon that function:
Hi @ackerkris ,
Thank you for reaching out to the Microsoft Community Forum.
The issue you are facing is classic for recursive API calls when a field can sometimes be null or not even exist, Power Query tries to access [Result][SalaryCursor] before it checks if [Result] is null, so it crashes.
Please refer below steps.
1. I have created sample data, In Power Query i have created sample M code for API function, Please refer snap.
2. Created Pagination logic, Please refer below snap.
3. For testing , I took the parameter values, Please refer in snap.
It will generate the two fields "Value" and "SalaryCursor" as below.
After expanding that two fields, you will get the below results.
Please refer attached PBIX file.
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.