It was requested of me to create a dashboard for an employee’s weekly labor hours. It could be for a few weeks to a number of years. I am able to use DATEPART to get the week number, day of week, etc but for the life of me, I cannot figure out how to get the labor hours for each Sunday to Saturday week range… Any help would be wonderful and appreciated.
I don’t think you can get this in Epicor’s BAQ.
I have done this previously however through External BAQ.
Epicor’s BAQ is very limited and not very flexible (compared to raw SQL).
This is simply not true. Anything I have written by hand I’ve been able to convert to a BAQ. There may be 1% of tasks I was unable to do with a BAQ.
To @SimpsonGranco if you are getting the week number you can simply group on year and week number that is your saturday to sunday assuming that is how your localization is setup. We do exactly what you are talking about for a 2 week payroll export to our processor. It summarizes the 2 week period, auto calculates the OT and any differentials, all in a BAQ
I like to use buckets too but… there are a couple questions I ask myself before I start down that road:
Do I want to select labor between start/end dates (start is always a Sunday)?
Can I use a static number of buckets? e.g. 8 buckets going back from end date and then 1 more bucket to sum any labor before that start date?