I want to use PowerQuery to read in a table of raw transactions (in a csv file) and combine it with a table of running transactions. The hitch is that the running transactions table contains manually-create labels.
For example, runningTable
could be
Date | Amount | Notes |
---|---|---|
2020-01-01 | 5.52 | Some notes |
2020-01-02 | -4.25 | Other notes |
The Notes
column is manually entered by the user to label the context for that transaction.
rawTable
could be
| Date | Amount |
| -------- | -------------- |
| 2020-01-01 | 5.52 |
| 2020-01-02 | -4.25 |
| 2020-01-03 | 10.00 |
| 2020-01-04 | 12.00 |
Since there are more dates in rawTable
, I need to update runningTable
to include the latest data. Currently, using PowerQuery, I can pretty easily read in both tables, do some transformations and filters, append one to the other, and output a new runningTable2
with all the notes from runningTable
, like so:
Date | Amount | Notes |
---|---|---|
2020-01-01 | 5.52 | Some notes |
2020-01-02 | -4.25 | Other notes |
2020-01-03 | 10.00 | |
2020-01-04 | 12.00 |
The problem is that I want runningTable
itself to be updated since edits in runningTable2
just get over-written when I run the query again. The best I can manage at the moment is to manually copy and paste runningTable2
onto runningTable
, thereby replacing that input table.
But is there a way to do this automatically in Excel?
Power Query self reference tables
– Ricardo Diaz