Skip to main content

Power BI

Needs Votes

Get current folder path in M language for dynamic folder path logic

Vote (64) Share
Chris Haas's profile image

Chris Haas on 05 May 2016 03:11:49

It's possible to get the current folder path of a file using a formula in Excel. This value can then be passed into Power Query. This works fine for data models and visualizations built entirely in Excel.

If the model is built in Power BI Desktop, there's currently no method to land this data into the data model.

Comments (2)
Chris Haas's profile image Profile Picture

fVoss on 05 Jul 2020 23:53:55

RE: Get current folder path in M language for dynamic folder path logic

I think this idea could be merged with the one in the following link

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/9665565-support-relative-path-to-excel-csv-sources

Chris Haas's profile image Profile Picture

Power BI User on 05 Jul 2020 22:51:27

RE: Get current folder path in M language for dynamic folder path logic

This is an important feature to get all of the sources in the same folder as the .pbix file.