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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Custom Column extracting file type

I know how to create a custom column, but i would need a formula that extracts the file type (extensions). I know of the LEFT command, but some file types are .PDF, 3 characters, while others are .DOCX etc where they are 4 characters. What would i need to imput to extract just the PDF or DOCX etc?

 

Thanks,

1 ACCEPTED SOLUTION

If you are in Power Query use the split column by delimiter option or extract option





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous ,

extension  = right( [Column], len([column]) -search(".",[column],,0) )

 

file= left( [Column],search(".",[column],,0)-1 )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks for the response, however, i am seeing this when i try to copy it over.

PeterZigante_1-1650389131634.png

 

If you are in Power Query use the split column by delimiter option or extract option





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors