Ok, I have been attempting this problem for 2 solid weeks now and have to admit it’s driving me insane.
Is there a way to sort the below table so that when there is an overlap, the “OverlapIndex” increments, depending on how many overlaps there are in the same AlloIndex group? Now, Overlaps can only occur in the same AlloIndex Group, however, if there are more than one OverLaps in the same group, but the 2 overlap ranges don’t overlap the other overlap ranges, then the OverlapIndex resets to 0. So, if the 1st index in the group does not overlap the 3rd index in the group, then its AlloIndex resets to 0.
Hope this makes sense
Here is the data:
RowText AlloIndex PosIndex FromTime ToTime OverLapIndex test1 0 0 21/06/2022 14:42 22/06/2022 2:43 0 test2 0 0 21/06/2022 14:42 22/06/2022 2:43 1 test3 0 0 22/06/2022 2:42 22/06/2022 14:43 0 test4 0 0 22/06/2022 14:42 23/06/2022 2:43 0 test5 5 5 21/06/2022 19:42 22/06/2022 7:43 0 test6 6 6 21/06/2022 16:42 22/06/2022 4:43 0 test7 7 7 21/06/2022 15:42 22/06/2022 3:43 0 test8 7 7 21/06/2022 19:42 22/06/2022 7:43 1 test9 8 8 21/06/2022 21:42 22/06/2022 9:43 0 test10 8 8 21/06/2022 22:42 22/06/2022 10:43 1 test11 9 9 22/06/2022 0:42 22/06/2022 12:43 0 test12 9 9 21/06/2022 15:42 22/06/2022 3:43 1 test13 9 9 22/06/2022 12:42 23/06/2022 12:43 2 test14 9 9 22/06/2022 10:42 23/06/2022 10:43 3 test15 10 10 21/06/2022 20:42 22/06/2022 8:43 0 test16 10 10 22/06/2022 1:42 22/06/2022 13:43 1
The table should look like this:
RowText AlloIndex PosIndex FromTime ToTime OverLapIndex test1 0 0 21/06/2022 14:42 22/06/2022 2:43 0 test2 0 0 21/06/2022 14:42 22/06/2022 2:43 1 test3 0 0 22/06/2022 2:42 22/06/2022 14:43 0 test4 0 0 22/06/2022 14:42 23/06/2022 2:43 0 test5 5 5 21/06/2022 19:42 22/06/2022 7:43 0 test6 6 6 21/06/2022 16:42 22/06/2022 4:43 0 test7 7 7 21/06/2022 15:42 22/06/2022 3:43 0 test8 7 7 21/06/2022 19:42 22/06/2022 7:43 1 test9 8 8 21/06/2022 21:42 22/06/2022 9:43 0 test10 8 8 21/06/2022 22:42 22/06/2022 10:43 1 test11 9 9 22/06/2022 0:42 22/06/2022 12:43 0 test12 9 9 21/06/2022 15:42 22/06/2022 3:43 1 test13 9 9 22/06/2022 12:42 23/06/2022 12:43 0 test14 9 9 22/06/2022 10:42 23/06/2022 10:43 1 test15 10 10 21/06/2022 20:42 22/06/2022 8:43 0 test16 10 10 22/06/2022 1:42 22/06/2022 13:43 1