Forum Discussion
No content with Web.Contents vs. Web.BrowserContents
Hi v-yingjl ,
thanks a lot for your reply.
But maybe I have not been very clear in my post: I am still in both scenarios within Power BI Desktop.
Only to avoid later-on issues when publishing to service I want now to switch from Web.BrowserContents to Web.Contents - why (small excurseion:
When using Web.BrowserContent - I receive in the PBI Service the following error message:
" This dataset includes a dynamic data source." with a link to https://aka.ms/dynamic-data-sources
There is said:
In most cases, Power BI datasets that use dynamic data sources cannot be refreshed in the Power BI service. There are a few exceptions in which dynamic data sources can be refreshed in the Power BI service, such as when using the RelativePath and Query options with the Web.Contents M function.
As I understand it I have to use Web.Contents with "RelativePath" instead of Web.BrowserContents. And this way it works also for other projects scraping other web-shops perfectly fine for me later-on in PBI Service (without On Premis Gateway).
But for the specific URL mentioned above I receive different results from Web.Contents compared to Web.BrowserContents.
So my main question is: How to workaround to receive the same HTML result from Web.Contents within PBI Desktop (in order to be able to publish it later-on to PBI service)?
Hi Anonymous ,
Based on my test, if you want to get the HTML table from web, you need to use Web.BroswerContents() which returns html, Web.Contents() will return a binary result.
If you nest Html.table() outside Web.Contents(), you will always get an empty table whatever your web address.
When you use the web connector to extract data, you would find that it also use Web.BroswerContents() instead of Web.Contents().
In addition, about Dynamic data source using Web.contents, you can refer: Dynamic Web.Contents() and Power BI Refresh Errors
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- vincent_nox4 years agoAdvocate I
Then, what if I have a pair of Web.BroswerContents() sourced tables?
How can I have them properly refreshed, within the Service (without a gateway)?
Sorry for the question, I'm new here (and I'm not sure to understand the whole flow) 🙂