Forum Discussion

mvgust's avatar
mvgust
Helper III
5 years ago

Index Column for Consecutive Days Employee Worked

I have a table which contains numerous different columns (15 total) with information about an employee's working day. What I need to do is create an index column which shows me when an employee has worked consecutive days.

Employee IDWork DateIndex
3345310/25/201
3345310/26/201
3345310/27/201
3345311/2/202
3345311/3/202
3345311/5/203

 

What I'm hoping to accomplish with this is to count the number of instances in the index to make comparisions. So in the above example, if I'm trying to determine if an employee worked 3 days in a row, by counting the index column I would be able to determine that yes, employee 33453 worked 3 days from 10/25/20 to 10/27/20.

Would this logic work and if so, how would I create the index column and then how would I do the count on the index column to determine the number of days?

 

Thank you.

3 Replies