Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
emilycgather
New Member

Setting up a File data source using Gateway in a published report

I've just had such a problem setting this up and I wanted to post my solution here to see if anyone can confirm or deny what I think I'm seeing.

 

Here's my scenario.  Designing a report using an Excel (xls) data source which I have copied to my local drive, so the path to the data source is c:\myfolder\myfile.xls.  We have the enterprise On-Premises Data Gateway set up on a server which has access to the master copy of the xls file on a network drive.  My user account has the relevant access to the gateway

 

I finish my report and publish to app.powerbi.com.  Check the settings for the Dataset and get "Gateway not configured correctly" message.  Click the button to 'Add to gateway' button and enter the various options, including changing the Full Path field so it is the correct path for the server to access the file (\\servername\fileshare\myfile.xls).  Click OK/Save, at which point I am taken back to the Gateway settings on my data source.  I can see at this point that it has not updated the file path to the file, it is still saying it is configured incorrectly and there is no dropdown to map the data source.

 

I tried various things to fix this, and eventually came across a solution.  What I had to do was add an entry to my hosts file and create a new share on my local machine so that in the desktop app, I could set the data source as being \\servername\fileshare\myfile.xls matching what it would be on the server.  If I publish the report now and use 'Add to Gateway', all I need to do is give it a data source name and set the credentials.  Once I save the data source, I then get the option to Map the File path to the data source I just created.

 

My question is this:  Is it really true that when creating reports in PowerBI desktop using a File as a data source, I need to use the exact same path to link to that data source as the Gateway would use?  And if so, why does it give you the option to change the Full Path when creating your data source in the Service?  

 

Can anyone point me to the documentation which specifies this? It would be useful to have this so I can explain it properly to the client I am working with on this!

2 REPLIES 2
emilycgather
New Member

Apologies for the delay, I've been away on leave.

 

Here is the screenshot of where it give you the option to edit the full path, this is what you get when you click the 'Add to gateway' button in the Dataset settings.  The Full Path field is editable here:

emilycgather_0-1661349422707.png

 

Tutu_in_YYC
Super User
Super User

Hi,
If i read this correctly, you set up your report datasource using Path1 (c:\myfolder\myfile.xls), but once you published this to the service, you are trying to connect Path2 (\\servername\fileshare\myfile.xls) to the dataset through the gateway. Is that right? If yes, my guess is Path1 is still the one that is being used in the M query, and you cant edit the Path1 to Path2 through Power BI service.

Can you provide a screenshot of where you have the option to change the full path?

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.