Avatar of Pau Lo
Pau Lo

asked on 

grouping a data set based on working weeks and unique dates

I have a rather substantial txt file which represents login/lock/unlock/logoff actions for one of our employees in a specific application. I want to import the data into Access or Excel (dependant on the best tool for the job) to get some stats from the data. There can be numerous entries for every working day to represent the times an officer has logged into, logged off from, locked and unlocked there account in a specific application. However, I need a report from all the data which shows how many unique days there are in the logs with any level of activity, for each 'week' - by which I am classifying that as a week commencing from and including Monday, to and including Sunday, e.g. Monday - Sunday, so this week would be 01-Oct-2018 - 07-Oct-2018, and next week would be 08-Oct-2018 - 14-Oct-2018.

For example if for the week commencing 01-Oct-2018 - 07-Oct-2018, there were rows of data on say the 1st, 3rd and 5th October, the end result for that week would be 3 days, as there were 3 unique dates listed in the logs. I should point out there is not 1 row of data per date, as if there were numerous login/lock/unlock/logoff actions for a date, each of these actions creates a row of data, so 01-Oct-2018 could have 2 rows in the dataset, or it could have 15. Struggling to find the best solution to get the information required, especially how to group them into how many unique dates there are listed as rows in the logs for each week commencing block (unless excel or access has a specific function for grouping weeks based on Monday-Sunday calendar dates).
Microsoft AccessMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Rob Henson

8/22/2022 - Mon