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 (83)
RE: Support relative path to excel/csv sources
Indispensable feature when multiple people need to develop and development on a server is not a possibility
RE: Support relative path to excel/csv sources
This is becoming a deciding factor in choice of BI.
RE: Support relative path to excel/csv sources
Please add this feature.
RE: Support relative path to excel/csv sources
Please add this!
RE: Support relative path to excel/csv sources
Surprising that this isn't already available
RE: Support relative path to excel/csv sources
Absolute paths are rarely ever useful. Relative paths should be the default.
RE: Support relative path to excel/csv sources
This capability exists in Excel. . .should also exist in Power BI
RE: Support relative path to excel/csv sources
I have many pbix files about 50 where I manually filter out the data using a text value. If I can have that value in the pbix file name I can get the file path and then parse it and pass it to the filter in power query. Something like var = thispbix. path
RE: Support relative path to excel/csv sources
In response to the last suggestion:
1 - create a parameter in PBI containing the 'single place' filepath
2 - save and send PBI file as template (to get prompted for the parameter)
3 - adjust your queries so your recepient can simply copy paste from explorer address bar (meaning "\filename.ext" included in your queries)
4 - recepient will open PBI template + get parameter = filepath prompt. Copy paste from explorer and all sourcefiles will work.
5 - Don't forget to save as for the PBI file (since it was a template which created a no name new file. And it does not even have to be in the same folder as the data.
But totally agree that an automated option is much more prefered.
Something like a "current PBI filepath" variable in powerquery.
RE: Support relative path to excel/csv sources
Whilst we wait for this feature to be implemented, in order to to ease the pain, you can define a variable that contains the folder, so you only have to change a single place: https://stackoverflow.com/a/52895973/211672