Forum Discussion
Anonymous
4 years agoNot applicable
Getting next date from dynamic indexing
Hello, In the below images, i'm trying to extract the datediff between some dates and then get a rolling sum of it, for every id. In the left table we have a date column sorted, which cor...
Anonymous
4 years agoNot applicable
Hi thanks for your replies.
I'm looking for a solution that will give me the specific result
The diff_in_minutes created column is basically the difference from the previous date entry, which is the metric im looking for. Consider that the dataset contains many id's.
I've attached a small sample that contains the data above without the last column.
| dot_workorderid | date_in | RowNum |
| id_1 | 22/12/2021 13:53 | 1 |
| id_1 | 22/12/2021 13:45 | 2 |
| id_1 | 22/12/2021 13:42 | 3 |
| id_1 | 22/12/2021 13:42 | 4 |
| id_1 | 22/12/2021 13:42 | 5 |
| id_1 | 22/12/2021 13:40 | 6 |
| id_1 | 2/12/2021 18:12 | 7 |
| id_1 | 2/12/2021 10:27 | 8 |
| id_1 | 2/12/2021 9:10 | 9 |
| id_1 | 2/12/2021 9:10 | 10 |
| id_1 | 2/12/2021 9:10 | 11 |
| id_1 | 30/11/2021 15:49 | 12 |
| id_1 | 30/11/2021 15:49 | 13 |
| id_1 | 30/11/2021 15:49 | 14 |
| id_1 | 30/11/2021 15:49 | 15 |
| id_1 | 25/11/2021 22:18 | 16 |
| id_1 | 25/11/2021 20:05 | 17 |
| id_1 | 25/11/2021 20:05 | 18 |
| id_1 | 25/11/2021 19:46 | 19 |
| id_1 | 25/11/2021 19:45 | 20 |
| id_1 | 25/11/2021 19:45 | 21 |
| id_2 | 10/9/2021 16:15 | 1 |
| id_2 | 26/8/2021 4:24 | 2 |
| id_2 | 10/8/2021 17:13 | 3 |
| id_2 | 10/8/2021 17:12 | 4 |
| id_2 | 10/8/2021 17:11 | 5 |
| id_2 | 10/8/2021 11:04 | 6 |
| id_2 | 8/8/2021 15:15 | 7 |
| id_2 | 8/8/2021 15:15 | 8 |
| id_2 | 5/8/2021 16:50 | 9 |
| id_2 | 5/8/2021 14:57 | 10 |