Forum Discussion
Alvarom1
6 years agoHelper I
Add column with folder name
Hi, I am getting data from Sharepoint where I have excel files in different folders. I need to add a column to my date that shows the name of the folder where the file source is. Example: Folder...
- 6 years ago
I assume you are opening the files via the Combine operation and your query steps look something like this, where the items in the red square were created by Power Query automatically by the Combine operation:
Go to the "Removed Other Columns1" step, and click the little gear icon. Check the "Folder Path" box and hit OK.
Go to the end of your query steps and you'll have a new folder path column where those files are located. You can then use Text.Start, Text.Middle, Text.End, or whatever to create whatever text you want to combine with the folders.
AkshayManke
5 years agoHelper II
Thanks a Lot edhans for the solution.
edhans
5 years agoCommunity Champion
Glad to help AkshayManke