I have the following problem: I have a table in which in the first column there are dates, in the second information whether a day is a working day or not (1 or 0) and in the third, the number of working days by which the value from the first column should be shift back. Anyone have maybe think how to get this fourth column?
The table looks something like this:
date | workday | days back |
---|---|---|
10.01.2021 | 1 | 1 |
10.01.2021 | 1 | 2 |
10.01.2021 | 1 | 3 |
10.01.2021 | 1 | 4 |
11.01.2021 | 0 | 1 |
11.01.2021 | 0 | 2 |
11.01.2021 | 0 | 3 |
11.01.2021 | 0 | 4 |
12.01.2021 | 1 | 1 |
12.01.2021 | 1 | 2 |
12.01.2021 | 1 | 3 |
12.01.2021 | 1 | 4 |