Forum Discussion

MODUser's avatar
MODUser
Frequent Visitor
2 years ago
Solved

Daily File Update/Overwrite

Created a query to pull a daily csv file, for which I have no creation control, that is auto saved to SharePoint. With each new daily file I need to overwrite the dated data in the existing query table with the new file data. Each file has the same format and titled with the run date and file name (name does not change), that is...20231012_File Name, 20231013_File Name etc.

 

For example, if the existing query table has dated data from 1/1/2023 through to 10/12/2023 and the new day's cvs file has dated data 10/2/2023 - 10/13/2023, I need to, essentially, delete all rows in the existing query table having the dates 10/2/2023 - 10/12/2023, then add the new file 10/2/2023 - 10/13/2023 data to the existing query table. How can I accomplish this within Power Query?

5 Replies