Loading Web Data into Power BI Service without Using a Gateway

This post is also available in: DeutschDeutsch

Many times, I’m creating a report in Power BI Desktop with data from a website. As an example, let’s imagine we create a report and load the population by country from this Wikipedia page. I’m loading data in Power Query from the web and at one point I am publishing my report to the Power BI Service.

Option to schedule refresh is disabled

After publishing the report, I want to schedule the report. But when I want to schedule the refresh, the settings look like that:

00 power bi service refresh dataset grayed out

Why is the scheduled refresh section grayed out? I don’t see any hint why this would be.
But there is one spot that gives you a hint. When you try to refresh the data manually, you will see an error:

01 hint after refresh

And when you click on it, you will see the details:

02 gateway is installed

Error message mentions gateway

The error message is a little confusing, why does Power BI complain about a gateway? We are loading from the cloud (Wikipedia) directly to the cloud (Power BI Service). It wouldn’t make sense to use a gateway.
By default, the function Web.BrowserContents will be used to load a website in Power Query. The official documentation of the function doesn’t mention why a gateway would be required. It only mentions that the website will be accessed “as viewed by a web browser”. My best guess is, that the HTML will be opened by the local installed browser engine. And this needs a local server, as Power BI service will not open them with a browser engine. But as I said, that’s only my guess. If you know more, please let me know in the comments.

Fix with Web.Contents function

The real question is how can we fix that? And this is surprisingly easy. Instead of the function Web.BrowserContents we can use the function Web.Contents and the website will load without gateway.

For that, just change the function directly in the Power Query code:

Change to function Web.Contents and Power BI will load without gateway
Change to function Web.Contents and Power BI will load without gateway

And afterwards you will see the options for a refresh and also if you trigger a refresh it will work like a charm:

Option for a scheduled refresh is available again
Option for a scheduled refresh is available again
Manually triggered, the dataset will refresh
Manually triggered, the dataset will refresh
Denis Selimovic

Denis Selimovic

As a user from the very beginning, Denis Selimovic is passionate about Power BI and everything related to it. In his blog WhatTheFact.bi, he writes about the latest developments in Power BI and provides tips and tricks on the subject. Besides being a Power BI enthusiast, blog author, speaker and principal consultant, he is also co-organizer of the Meetup Power BI User Group Switzerland.

Kommentare:

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
| Reply
%d bloggers like this: