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