Forum Discussion
Anonymous
4 years agoNot applicable
Hand Authored Queries
Hi Can I ask for help in changing the query below to make it work for schedule refresh? I've been going around in the community and web but really can't find a fix for my problem. Thank you so muc...
v-jingzhang
4 years agoCommunity Support
Hi Anonymous
In your gather function, below codes would create dynamic url. Maybe this is the cause.
newOffset = Json.Document(Web.Contents(uri, headers))[next_page][offset],
newUri = baseuri & "&offset=" & newOffset,
You could refer to Chris Webb's BI Blog: Web.Contents(), M Functions And Dataset Refresh Errors In Power BI
(as well as other links in this blog directing to his previous blogs). Try using RelativePath and Query options with Web.Contents() to query data. Use a valid static URL as a base URL and put dynamic part in RelativePath or Query options.
Hope this would be helpful.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.