Forum Discussion
Anonymous
7 years agoNot applicable
Compare Daily csv files
Good Day, Looking for the best way to approach the following: 1. We will have one master csv file with a few thousand rows. then we combine the first two columns to make a unqiue identifier fo...
edhans
7 years agoCommunity Champion
You can do this in Power Query.
- Combining the first two colums to make a unique identifier is pretty simple. You can actually just select those columns, select teh Add Column ribbon, and "Merge Columns." You can then tweak how it looks in the formula bar if it doesn't look exactly like you want.
- You'll do a "Right Anti Merge" to identify any records in the 2nd CSV file that don't exist in the Master CSV file.
- You can then append those results to the master CSV query. You'd create a reference to the Master CSV query, then Append Queries to the merged query above.
The problem is if you do this with the Master CSV file and File A on Monday, if you do it with Master CSV file and File B on Tuesday, File A will no longer be in the mix. Power Query will NOT actually modify your source files. If you want it to be additive, you'd need to actually copy the results of the Right Anti-Merge and then Paste them to the actual CSV file using Notepad or similar text editor.