Forum Discussion
Get current file name within PowerQuery Editor
- 5 years ago
You can Anonymous . You would need to use the Combine feature for files. That will load all files within a filter (you could filter to a specific folder and only pull in .xlsx files for example) and the filename is available there.
Here I connected to a folder and there are 3 files:
I then hit the COMBINE button I'm pointing to.
Once you do the combine, look at your Applied Steps. You may need to edit the "Removed Other Columns" step.
Click the gear and make sure the Source Name column is visible. This is the file name.
At that point, your final query will have the file name imported, and you can manipulate it like any other column.
This method will let you just keep dropping new files in with the month name in it and it will get pulled in on the next refresh.
- Anonymous5 years ago
Thanks for the help - i've used your approach and figured it out
Thanks for the help - i've used your approach and figured it out
Great! Glad I was able to assist.
- Anonymous5 years agoNot applicable
You definately did.. Appreciate the simple approach and screenshots made it easier to follow😀👌