Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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,

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

3 Replies

  • Anonymous ,

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

     

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

    • Anonymous's avatar
      Anonymous
      Not applicable

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

       

      • PaulDBrown's avatar
        PaulDBrown
        Community Champion

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