Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
My scenario is that I have a column named 'Path' which contains the Path to a list of files. I need a custom column which only includes the text before the last delimitter. For example,
Full Path:
\\SERVER\FOLDER1\FOLDER2\FOLDER3\Excel.XLSXFolder Path:
\\SERVER\FOLDER1\FOLDER2\FOLDER3\
There is going to be many different variations of this, so I can't just stick to one number, but it will always be before the last one.
I've tried messing around with the 'Extract' function but can't get it to work. Any ideas how to put this into a 'Cutom Column'?
Solved! Go to Solution.
Hi @dinosainsburys - you can create a Custom Column in Power Query using the custom column add the below formaule given.
Text.BeforeDelimiter([Path], "\", {0, RelativePosition.FromEnd})
Hope this works.
Proud to be a Super User! | |
Please see the screenshot below:
You can either transform the curent column or add a new one.
Hi @dinosainsburys ,
It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered? If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
Looking forward to your reply!
Please see the screenshot below:
You can either transform the curent column or add a new one.
Hi @dinosainsburys - you can create a Custom Column in Power Query using the custom column add the below formaule given.
Text.BeforeDelimiter([Path], "\", {0, RelativePosition.FromEnd})
Hope this works.
Proud to be a Super User! | |
Sorry, I should have specified a bit better. How do I remove any of the text between the delimiters?
For example,
where I have this:
\\SERVER\FOLDER1\FOLDER2\FOLDER3\
that would imply it is in FOLDER2
so it should display something like this:
\\SERVER\FOLDER1\FOLDER2\
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!