Forum Discussion
Dynamic data source error
Hi Cybacor
Is it possible to query data from the url by using Web.Contents() instead of OData.Feed? If it is, you can try passing the site url to the url paramter, and passing /_api/web/lists/GetByTitle('Project Status Reports')/Items() to the RelativePath option and Select=Title to the Query option.
Source = Web.Contents(
site,
[
RelativePath="_api/web/lists/GetByTitle('Project Status Reports')/Items()",
Query=[$Select="Title"]
]
)
The following blogs talk about the relevant solution about this topic:
Using The RelativePath And Query Options With Web.Contents() In Power Query And Power BI M Code
Power Query – Dynamic Data Source and Web.Contents()
However, OData.Feed doesn't have the RelativePath option so it cannot apply above solution to OData.Feed. You can refer to the 7th message in this thread: https://community.powerbi.com/t5/Desktop/OData-Feed-command-with-query-and-options-no-working/m-p/1164683#M526237
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.