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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! 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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.