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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.