Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
I am trying to automate loading 2 files dynamically into a daily process.
Given that each file has a date stamp and is stored in the same folder directory, I was able to use Power Query to create a new column called 'File Date' to dynamically identify today and last business day's files, as seen in below screen print.
I now need to reference cell C2 & C3 to load both files in for further data transformation.
Any suggestions on how to go about loading both files? The "CompleteFilePath" column contains the entire file path "C:\Users..\..csv
Hi @JJH_
Given that you've written a query that has the paths/filenames of the 2 files you want, do you need to write them out to Excel at all?
You can just extract both filenames from the query and use them in subsequent queries.
Once you've reduced the query to just the 2 filenames you want, add an Index Column (here's an example from my PC)
Then duplicate the query.
Filter the first query to just give you the 1st file, and filter the 2nd query to give you the 2nd file.
You now have 2 queries whose outputs are the names/paths of the 2 files you need.
Cheers
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
| User | Count |
|---|---|
| 19 | |
| 12 | |
| 8 | |
| 8 | |
| 7 |