In the past, some customers asked me, how can I change the path for a local, imported file, to a path which can be refreshed by Power BI Online. You have two options, you can install a Power BI Data Gateway or you can move your data to online storage, like OneDrive. The first one should be managed by your IT department, so I think the OneDrive solution is much easier.
But let us start at the beginning. I imported a local file to my data model.
![](https://www.flip-design.de/wp-content/uploads/2022/11/image.png)
If we look to the Advanced Editor inside Power Query, we see the lo al file connector.
![](https://www.flip-design.de/wp-content/uploads/2022/11/image-1.png)
So, I uploaded the file to my OneDrive Share.
![](https://www.flip-design.de/wp-content/uploads/2022/11/image-2.png)
You can grab the connection string from your browser:
![](https://www.flip-design.de/wp-content/uploads/2022/11/image-3.png)
After that, you can get new data from the SharePoint folder.
![](https://www.flip-design.de/wp-content/uploads/2022/11/image-4.png)
![](https://www.flip-design.de/wp-content/uploads/2022/11/image-5.png)
Now, we get every file which is stored inside the OneDrive folder. After clicking “Transform Data”, we can filter our file by the folder and/or filename.
![](https://www.flip-design.de/wp-content/uploads/2022/11/image-6.png)
![](https://www.flip-design.de/wp-content/uploads/2022/11/image-7.png)
![Graphical user interface
Description automatically generated](file:///C:/Users/phlenz/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg)
Now, navigate to the Advanced Editor and copy the whole M code.
![](https://www.flip-design.de/wp-content/uploads/2022/11/image-8.png)
![](https://www.flip-design.de/wp-content/uploads/2022/11/image-9-1024x541.png)