Forum Discussion
Anonymous
7 years agoNot applicable
Folder name to Column
I am trying to create a report where the excel sheets are all stored inside separate folders inside the root directory folder. If I use the root directory folder for "Get Data", is there a way to mak...
- Anonymous7 years ago
Hi Anonymous,
You can add a custom column with below formula to get file's parent folder name as custom column value.
#"Added Custom" = Table.AddColumn(#"Previous Steps", "Parent", each List.First(List.LastN(Text.Split([Folder Path],"\"),2)))
Regards,
Xiaoxin Sheng
itsmebvk
7 years agoContinued Contributor
Anonymous Can you try this method
https://www.linkedin.com/pulse/parsing-folders-power-bi-adding-folder-name-column-query-rob-reilly
- Anonymous7 years agoNot applicable
In this case the file names in this folders are random worksheets rather than 5 different CSVs. How does this change the steps I need to use?