Forum Discussion
Power Query Change Source File Without Re-Edit
Power query that loads daily data from a csv file. The format of the file is the same everyday, only the name changes. Is it possible to change the date source file name and have it loaded into the existing table without having to re-edit.
The import file is generated in this format - QuestionListsYYYYMMDDTTMMSS
Appreciate your feedback. Thx in Advance
Hi razickrahuman , Yes, you can handle dynamic file names in Power Query could you please check these
Use a Folder Query:
- Place all daily files in a single folder.
- In Power Query, use "Get Data > Folder" to load all files.
- Filter the latest file by extracting the date from the file name or sorting by the Date Modified column.
Parameterize File Name:
- Replace the file name in the source step with a dynamic parameter.
- Use a function or logic to pick the latest file automatically.
If this post helped please do give a kudos and accept this as a solution
Thanks In Advance
- Anonymous1 year ago
Hi razickrahuman
Thank you for reaching out microsoft fabric community forum.
I would also take a moment to thank Akash_Varuna ,for actively participating in community forum and for the solutions you have been sharing in the community forum.
By using a folder as a data source or implementing parameters, you can efficiently manage daily updates to your Power Query without needing extensive re-editing of transformation steps. This approach not only saves time but also minimizes errors associated with manual updates.If you need any further assistance or have any questions, please feel free to reach us.
If this solution helps, please consider giving us Kudos and accepting it as the solution so that it may assist other members in the community.
4 Replies
- Akash_Varuna
Super User
Hi razickrahuman , Yes, you can handle dynamic file names in Power Query could you please check these
Use a Folder Query:
- Place all daily files in a single folder.
- In Power Query, use "Get Data > Folder" to load all files.
- Filter the latest file by extracting the date from the file name or sorting by the Date Modified column.
Parameterize File Name:
- Replace the file name in the source step with a dynamic parameter.
- Use a function or logic to pick the latest file automatically.
If this post helped please do give a kudos and accept this as a solution
Thanks In Advance
- AnonymousNot applicable
Hi razickrahuman
Thank you for reaching out microsoft fabric community forum.
I would also take a moment to thank Akash_Varuna ,for actively participating in community forum and for the solutions you have been sharing in the community forum.
By using a folder as a data source or implementing parameters, you can efficiently manage daily updates to your Power Query without needing extensive re-editing of transformation steps. This approach not only saves time but also minimizes errors associated with manual updates.If you need any further assistance or have any questions, please feel free to reach us.
If this solution helps, please consider giving us Kudos and accepting it as the solution so that it may assist other members in the community.
- razickrahumanNew Member
Thx Anonymous. Works perfectly...
- razickrahumanNew Member
Thx Akash_Varuna . It works perfectly.