Skip to main content

Power BI

Needs Votes

Support relative path to excel/csv sources

Vote (727) Share
Boris Lipschitz's profile image

Boris Lipschitz on 08 Sep 2015 10:25:40

Currently, when excel file is loaded to Power BI, the absolute filepath is captured in the M query. It would be nice if relative filepath was supported. Thus we could place excel file next to pbix and not worry about the file location (local machine, shared folder on server or onedrive)

Comments (59)
Boris Lipschitz's profile image Profile Picture

85341f0f ebf7-4bda-8b43-2f159ae1c608 on 05 Jul 2020 23:19:48

RE: Support relative path to excel/csv sources

Hi, super important feature. Not only for the flexibility of being able to distribute these models with their source files, but also because if your model is in an older excel version, when updated, the 'existing connections' option is no longer available, so you cannot even edit the path any more.

Boris Lipschitz's profile image Profile Picture

41ba6ceb 09b2-4b82-a213-3356af3b77c6 on 05 Jul 2020 23:12:35

RE: Support relative path to excel/csv sources

It is ridiculous that this is not yet supported

Boris Lipschitz's profile image Profile Picture

cf6434eb 6ffc-4212-91e4-654a224e2ca9 on 05 Jul 2020 23:08:59

RE: Support relative path to excel/csv sources

I would expect Microsoft would consider such a useful idea, almost 3 years since the suggestion was made and not available yet. The vitality of a software product is done by the amount of developers and end-users. Most passionate end-users are the ones making these suggestions.

Boris Lipschitz's profile image Profile Picture

e97012f7 0011-4a99-a6db-c86e342ca024 on 05 Jul 2020 23:06:46

RE: Support relative path to excel/csv sources

I would agree this would be a great feature. Another option that may be easier to implement is to enable PowerBI to identify its own path so we can then use this as a parameter when pointing to datasources stored in the same folder. Excel has a simple formula to identify its own path which is SourceFilename = ThisWorkbook.Path so perhaps PowerBI can replicate this.

Boris Lipschitz's profile image Profile Picture

d045458f ff5d-4d34-8621-4fb8195192f4 on 05 Jul 2020 23:05:21

RE: Support relative path to excel/csv sources

I think it will be very useful to support relative path, this way, you can send a pbi file to someone else and ask them to place the source files in the same folder.
The query will be looking at it's own containing path as the local path. so if the source is somefile.csv, it will defaultly look into the current folder it's running from

Boris Lipschitz's profile image Profile Picture

cd8046c3 6f42-4e29-9b8a-d73668470e3f on 05 Jul 2020 22:59:22

RE: Support relative path to excel/csv sources

Any update from the dev team on relative paths?

Boris Lipschitz's profile image Profile Picture

73ad4957 de7f-476c-80db-6b12276da7f5 on 05 Jul 2020 22:54:37

RE: Support relative path to excel/csv sources

Absolutely necessary to make it comfortable

Boris Lipschitz's profile image Profile Picture

26fdd9f5 c140-44e6-bbc9-4c9d15f088e4 on 05 Jul 2020 22:54:04

RE: Support relative path to excel/csv sources

Would love to see this implemented... I have a report with several queries, and would like to keep each query in a separate file, which would then be stored in git. It would enable us to easily review changes to specific queries and rollback when necessary.
I could achieve that with relative reference to query files in the same folder as the pbix file is.

Boris Lipschitz's profile image Profile Picture

169d925f 7116-43a0-9b1f-e217e8ba592f on 05 Jul 2020 22:48:41

RE: Support relative path to excel/csv sources

Hi, I would appreciate this as well. It is very useful for deploying template reports in applications.

Boris Lipschitz's profile image Profile Picture

3164ad25 23de-4ce8-ae5d-821a787c6cb9 on 05 Jul 2020 22:47:59

RE: Support relative path to excel/csv sources

Hi there,
I would appreciate this feature. We are trying to deploy a dashboard template with the data source in the same folder. For my teammates it would be very helpful, not to change the source path.