Link to home
Start Free TrialLog in
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).
Avatar of als315
als315
Flag of Russian Federation image

Access is more flexible for such tasks. You can select officer, date and group by these fields. In next query you can count dates for each week
Avatar of Pau Lo
Pau Lo

ASKER

I did think it may require a staggered approach, with a couple of processes.

>In next query you can count dates for each week

Do you have any examples e.g. a standard function which calculates all entries for a week based on Monday-Sunday.
Can you upload small sample of text file? Sequental queries are normal for Access
Avatar of Pau Lo

ASKER

It really is as simple as a comma separated file, whereby a standard set of data would be (there are other rows but they are irrelevant for what I need). It is sequential in that it lists all users actions in chronological order, not just for each individual.

date, time, officer, action
01/08/2018, 16:14, userB, logon
01/08/2018, 16:25, userB, logoff
02/08/2018, 15:15, userA, logon
02/08/2018, 15:50, userA, lock
02/08/2018, 15:55, userA, unlock
02/08/2018, 16:35, userA, logoff
ASKER CERTIFIED SOLUTION
Avatar of als315
als315
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
How about using a Pivot Table???

If you upload some sample data, maybe 100 rows, and show what result you would like to see then I can take a look.