Forum Discussion
Error Message can't refresh
This is a common issue that I've helped many developers in our organization resolve when they're trying to connect to a local file on a corporate server.
The Core Issue
The error occurs because your Power BI report is looking for a file on Drive Z:. While that mapped drive exists on your personal machine or a specific on-premises server, the On-premises Data Gateway (the service handling the refresh) runs as a background service account. These service accounts operate in "Session 0" and cannot "see" or authenticate against mapped network drives like Z:.
The Fix: Switch to UNC Paths
To resolve this, you must change the file path in your Power BI Desktop file from a mapped letter (Z:\) to a UNC (Universal Naming Convention) path. This provides a direct network address that the Gateway can resolve.
1. Identify the Server Name
Instead of Z:\, you need the absolute server address:
- Open Windows File Explorer.
- Right-click on your Z: Drive.
- Select Properties or look at the path in the address bar.
- It should look something like: \\ServerName\SharedFolder\Development\...
2. Update and Republish
- Open your .pbix file in Power BI Desktop.
- Go to Transform Data and update the Source step of your query with the new \\ServerName\... path.
- Republish the report to the Power BI Service.
Once republished, the "Refresh" option will be able to communicate with the Gateway correctly.
Let me know how it goes.