Forum Discussion
Power Query - Is it possible to append tables with overlapping data
Hi,
I am new to this community and was hoping to get some guidance around tackling an situation I am facing.
I receive a data in a table format for last 100days every week. I would like to append the tables and create one table from all the files however, I cannot think of a way to active this using power query.
I have created rolling 14day data table below as an example.
Table 1
Date | data |
1/01/2021 | 11 |
2/01/2021 | 86 |
3/01/2021 | 20 |
4/01/2021 | 39 |
5/01/2021 | 21 |
6/01/2021 | 35 |
7/01/2021 | 46 |
8/01/2021 | 58 |
9/01/2021 | 73 |
10/01/2021 | 5 |
11/01/2021 | 71 |
12/01/2021 | 35 |
13/01/2021 | 81 |
14/01/2021 | 44 |
The next week I would receive a table like below
Date | data |
7/01/2021 | 94 |
8/01/2021 | 23 |
9/01/2021 | 47 |
10/01/2021 | 70 |
11/01/2021 | 97 |
12/01/2021 | 15 |
13/01/2021 | 77 |
14/01/2021 | 58 |
15/01/2021 | 10 |
16/01/2021 | 43 |
17/01/2021 | 41 |
18/01/2021 | 71 |
19/01/2021 | 96 |
20/01/2021 | 57 |
21/01/2021 | 20 |
So I would like to append the two tables and create a table which contains data for 1-21 Jan, but avoid duplicating 07-14 Jan data, is this possible using power query?
Thanks in advance.
After you append one to another, in Power Query editor select both columns
Home -> Remove Rows -> Remove Duplicates
5 Replies
- Detlef_LewinSilver Contributor
but avoid duplicating 07-14 Jan data, is this possible using power query?
There is no duplicate data in that period - apart from the dates themself.
- lucioxiiiCopper Contributor
Thanks for pointing that out.
I have updated the data in the tables.
Table 1
Date data 1/01/2021 11 2/01/2021 86 3/01/2021 20 4/01/2021 39 5/01/2021 21 6/01/2021 35 7/01/2021 94 8/01/2021 23 9/01/2021 47 10/01/2021 70 11/01/2021 97 12/01/2021 15 13/01/2021 77 14/01/2021 58
Table 2
Date data 7/01/2021 94 8/01/2021 23 9/01/2021 47 10/01/2021 70 11/01/2021 97 12/01/2021 15 13/01/2021 77 14/01/2021 58 15/01/2021 10 16/01/2021 43 17/01/2021 41 18/01/2021 71 19/01/2021 96 20/01/2021 57 21/01/2021 20 - SergeiBaklanDiamond Contributor
After you append one to another, in Power Query editor select both columns
Home -> Remove Rows -> Remove Duplicates