r/excel • u/RustiedTeapot • Oct 25 '18
solved Power Query: Append And Keep Data
I've recently been learning PowerQuery in an attempt to streamline some rather archiac spreadsheets currently in use in the office, although I'm relatively new to it so far it's been bloody effective.
I've been trying to make PowerQuery import data from a report, transform the data as necessary, and then make a copy of any new distinct rows on an archive table.
Example as below:
- Import data to Sheet 1 from folder,
- Transform and merge unique rows from the data to an archive table
- Have any unique rows from data remain when new data imported
I can't seem to find a way to do this - any ideas?
View all comments
Show parent comment
2
u/small_trunks 1638 Nov 02 '18
I'd keep it out of the qryWeb query because it's a post query enrichment and also for the next point below:
You have another decision to make: whether you want to preserve old enrichments or always reapply them anew.
Now, if we'd like to reapply the enrichment even to old rows, I'd strip out the (old) enrichment column every time and add it back in after the append of new data.
To summarise, that sequence would look like this: