Share via

Excel power query name mapping

Anonymous
2024-11-05T17:31:30+00:00

need to link excel file to power query but last part of the file name is different. Is it possible to fix only the first 5 letters of the file fixed and rest any alphanumerics?

Microsoft 365 and Office | Install, redeem, activate | Other | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-11-06T05:06:01+00:00

    Dear rashitha perera,

    We're glad we were able to help, and please don't forget to contact the Microsoft community if you run into problems in the future.

    Best regards

    Miyeon.S - MSFT |Microsoft Community Support Specialist

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-11-06T04:28:18+00:00

    Miyeon. Thanks a lot. It really helped. Thanks again.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-11-06T03:08:27+00:00

    Dear rashitha perera,

    Thanks for visiting Microsoft Community.  I am happy to help you.

    Steps to Link a File with a Variable Name in Power Query:

    Open Power Query:

    In Excel, go to the Data tab.

    Click on Get Data > From File > From Folder or From Workbook, depending on your needs.

    Locate the Folder:

    If you chose From Folder, navigate to the folder that contains the target file.

    Apply Filtering:

    Once the folder’s contents are loaded, you will see a list of files.

    You will want to filter this list to only show files that start with the specific 5 letters you know.

    Use Transform Option:

    Select the column containing the file names (often Name) and apply a filter.

    You can add a custom filter by selecting Text Filters > Begins With... and enter the fixed 5 letters of your file name.

    If the last part of the file name is not fixed, you can leave it out, as filtering by just the beginning will encompass all variations.

    Load the Data:

    After filtering, you should only see the relevant files. If you only expect one file, you might want to keep the Keep Top Rows option to select the first file.

    Once you have the correct file listed, click on the Combine button (if dealing with multiple files) or just load the content of the selected file.

    Adjust and Load:

    Continue adjusting your queries as needed and load the final data into Excel.

    Your problem is more suitable to be posted at  Power Query - Microsoft Fabric Community, where there are more specialized technical support staff with users to help you solve your problem.

    Best regards

    Miyeon.S - MSFT |Microsoft Community Support Specialist

    Was this answer helpful?

    0 comments No comments