Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
SergioHB
Helper I
Helper I

Parsed Filename and Extension as Column

Hi all,

 

I have a .csv file that contains a path and filenames in it and I need to extract the file extensions in a different column. The thing here is that some of those paths contains data with multiple separators in it, then I can't rely on the Text.AfterDelimiter function as this is returning the part of the string after the first delimiter and also, cannot use the Text.End as there are extensions with two, three and four letters in it.

 

I guess by searching from the end of the path until it finds the first separator ('.') would be enough to return the correct value, but I can't make it.

 

Appreciate any help on this. Leave some examples of the info.

 

./TEST_PNG_File-0.png.Thumbnail.jpg
./TEST2_PNG_File-0.png.SmallImage.jpg
File.TEST ai..ai

 

Thanks

Sergio

 

1 ACCEPTED SOLUTION
AilleryO
Memorable Member
Memorable Member

Hi,

 

If you use on Power Query the split Column button (tab Home),

you have an option to select to use the most left or most right delimiter.

If you use the most right, it should work.

Check that your column, is of Text type, to have all options available.

 

Let us know if it works,

 

View solution in original post

3 REPLIES 3
msauriol
New Member

Another way I found is to duplicate the filename column into a new extension column, then use extract before (file) and after (ext) the delimiter, on the filename and extension columns. Specify the period as the delimiter in the extract screen, and under Advanced, select from the end of the input for both left and right filename parts.

AilleryO
Memorable Member
Memorable Member

Hi,

 

If you use on Power Query the split Column button (tab Home),

you have an option to select to use the most left or most right delimiter.

If you use the most right, it should work.

Check that your column, is of Text type, to have all options available.

 

Let us know if it works,

 

Works really good @AilleryO .

 

Thanks for your help and quick reply.

 

Stay safe.

Sergio

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors