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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join 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 is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

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.