Hi Experts, Require your help on this. I have tried my best with LAG function but didn't work for all the scenarios. I have the TimeIn and TimeOut fields and have to create the Flag below. Thanks a lot for the help. RowNo. TimeIn TimeOut Flag 1 14SEP2020:08:02:31 14SEP2020:08:02:31 N 2 14SEP2020:08:02:53 14SEP2020:08:04:19 N 3 14SEP2020:08:03:38 14SEP2020:08:04:57 N 4 14SEP2020:08:15:25 14SEP2020:08:25:39 N 5 14SEP2020:08:20:13 14SEP2020:08:20:38 Y 6 14SEP2020:08:49:01 14SEP2020:09:50:59 N 7 14SEP2020:08:53:43 14SEP2020:09:18:27 Y 8 14SEP2020:09:17:33 14SEP2020:10:07:03 N 9 14SEP2020:09:24:44 14SEP2020:09:26:08 Y 10 14SEP2020:09:27:15 14SEP2020:10:00:23 Y 11 14SEP2020:09:43:23 14SEP2020:09:43:26 Y 12 15SEP2020:08:02:31 15SEP2020:08:02:31 N 13 15SEP2020:08:02:53 15SEP2020:08:04:19 N 14 15SEP2020:08:03:38 15SEP2020:08:04:57 N 15 15SEP2020:08:15:25 15SEP2020:08:25:39 N 16 15SEP2020:08:20:13 15SEP2020:08:20:38 Y 17 15SEP2020:08:49:01 15SEP2020:09:50:59 N 18 15SEP2020:08:53:43 15SEP2020:09:18:27 Y 19 15SEP2020:09:17:33 15SEP2020:10:07:03 N 20 15SEP2020:09:24:44 15SEP2020:09:26:08 Y 21 15SEP2020:09:27:15 15SEP2020:10:00:23 Y 22 15SEP2020:09:43:23 15SEP2020:09:43:26 Y
... View more