By importing a file as a web source, the Power BI report publishing process on the Power BI Service will be simplified.
On the contrary, if the file is imported conventionally into Power BI Desktop, the data source will refer to the directories on your local computer and you will need to install a gateway to your computer to update the data on the Power BI Service. The import procedure described here avoids the need for a gateway.
Here is a tutorial to import a file as a web source in Power BI Desktop:
- In SharePoint, OneDrive or Teams, navigate to the desired file and open it in the app
- The file opens locally on your workstation
- Under the File menu, access the Info section and click on the Copy path button
- In Power BI Desktop, under the Home menu, under Get Data, choose Web
- Paste the path in the URL box, but delete the end: ?web=1
- Click Ok
- Enter your organizational account credentials, if requested
- In the file preview window, make the necessary selections and click on Transform data
- The file will display in the Power Query window.