Hi Everyone,
I have been struggling with transpose, join and batch tools to transform a table with timestamped values:
01/01/2019 | 0 |
02/01/2019 | 1 |
03/01/2019 | 0 |
04/01/2019 | 1 |
05/01/2019 | 10 |
06/01/2019 | 5 |
07/01/2019 | 3 |
08/01/2019 | 0 |
09/01/2019 | 1 |
10/01/2019 | 0 |
11/01/2019 | 0 |
12/01/2019 | 1 |
13/01/2019 | 0 |
14/01/2019 | 1 |
Into a table where each column is showing the 5 consecutive values from the date in the column header:
01/01/2019 | 02/01/2019 | 03/01/2019 | 04/01/2019 | 05/01/2019 | | 09/01/2019 | 10/01/2019 |
0 | 1 | 0 | 1 | 10 | … | 1 | 0 |
1 | 0 | 1 | 10 | 5 | … | 0 | 0 |
0 | 1 | 10 | 5 | 3 | … | 0 | 1 |
1 | 10 | 5 | 3 | 0 | … | 1 | 0 |
10 | 5 | 3 | 0 | 1 | | 0 | 1 |
Said otherwise, there is a one row lag from one column to another.
And, of course, keeping in mind that the number of rows in the initial table might change and the number of rows in the final table (5 in the example) as well.
Thanks 🙂