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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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 Solution Authors