Forum Discussion

Jeanxyz's avatar
Jeanxyz
Icon for Power Participant rankPower Participant
5 years ago
Solved

how to get year data from file name

Hi, My source file is an Excel stored on sharepoint, the last four digit of the file name (xxxxx_05.08.2021.xlsx) is the year number. I have loaded the data to power query, I want to add a year colu...
  • PC2790's avatar
    5 years ago

    In Power Query, you can go to Transform -->Extract --> Text Between Delimiters and configure it like this:

    Make sure to duplicate your column to retain the file name as well