Employee Punch Report

Copper Contributor

I am trying to determine the average number of shifts worked per week AND average number of hours worked per shift by location.  My report can have multiple "In Punch" and "Out Punch" records on a single day for the same employee because they will clock in and out for a break.  But, that is all considered one shift.  How do you recommend I clean the data in this situation?  I believe if I put the separate punch records for the same date/employee on different lines, it would count as multiple shifts.Employee Punch.jpg

3 Replies

@jenrlaird 

 

It's not altogether clear what the image is that you're showing. And your questions are somewhat ambiguous as well. I suspect that's why, after over 40 views, nobody has yet responded. So let me ask a few questions to see if we can get something moving.

 

The basic task is clear--determine the average number of shifts worked per week AND average number of hours worked per shift by location--but when you say your "report can have multiple "In Punch" and "Out Punch" records on a single day for the same employee because they will clock in and out for a break.  But, that is all considered one shift" it starts to get confusing.

  • Is that your report that can have those multiple entries or your raw data; is it your desired output or the present input? I'm presuming it's the latter, the raw (input) data. 

You then ask "How do you recommend I clean the data in this situation?" What do you mean by "clean" in this case? That's a very different question from the next one, which is more a matter of how to array the raw data (or at least that's how I read it).

 

Finally, you say "I believe if I put the separate punch records for the same date/employee on different lines, it would count as multiple shifts." That's not necessarily the case; depends on how you extract the data from the database; so long as the date is also present on the row, in addition to the clocking in and out times, and each individual's id is on each row (and each such action is in fact in the same shift) it should be fairly easy--maybe even easier--to have each transaction on its own row.

 

But given all those questions, and the image you've posted, it's not clear where you are in the overall process--whether you actually HAVE a lot of data already, or are still in the early design stage and wondering how to collect and array the raw data.

 

If you have a database already, so long as you can remove the names of actual employees, you'd help us help you by posting a copy of that database on OneDrive or GoogleDrive with a link pasted here that grants access to it.

@mathetes:  Hello and thanks for your response!  I'm very new to this so I apologize if my question and terminology didn't make sense.  Here is my raw data:  Punch Detail Data.

 

I am needing to calculate average number of shifts worked per week and average length of the shifts.  I'd also like to have the average number of hours worked per week.  These calculations would all be by "Department".  I will be reporting on this information weekly but would need the ability to go back and analyze previous weeks, months, years.   Hopefully this help.  Thanks so much!

 

 

@jenrlaird 

 

The Pivot Table is a tool in Excel that (I think) will do what you want to do--no formulas needed. I've attached a couple quick examples to show you reports that it can generate. I did take the liberty of adding two columns to your data, helper columns that translate the date filed into (a) Year, and (b) Week number of that year (i.e., 1 - 52 or 53), in sequence throughout the year.

 

The examples I created are not exhaustive. I didn't, for example, do average length of shift, but that would be quite easy. My purpose at this stage is just to show you what most people consider--once they've learned it--a very quick and easy way to summarize the kind of data you have. That "easy way" is the Pivot Table.

 

I let the Pivot Table routine do the summing (of hours per week per department) and that looks like this for 2023. You can change the year selected, there in the top row, when you open the attached file (the report for 2022 had more weeks, so was really too large to be practical here as a screen image). 

mathetes_1-1683562579601.png

 

For the number of shifts, I made an assumption, and that assumption was that each ID counted as one shift for that day. So what it counted, in fact, was number of IDs per department per week. It looks like this. 

mathetes_0-1683562438524.png

So my question for you is whether this kind of summary is what you've been asked to produce. If so, the Pivot Table is the tool for you. To learn it to be able to do it, let me provide links to two sources.