Hi All,
I have rather “tricky” problem that I hope you guys can help with. I want to calculate a weekly chargeable bookings from a timesheet data that has total week hours based on different booking types.
At the start of the first working day in each month, I want to know how many chargeable bookings were worked in the previous week up on till the last Friday. E.g., week starting 01/11/2021, it will show chargeable bookings from 25 – 29/10/2021. This is a relatively straight forward calculations when the first working day of a month is on a Monday.
When the first working day in a new month is not on a Monday e.g., In week starting 05/07/2021, first working day falls on Thursday of the previous week (week starting 28/06/2021). We must account for the fact that only 2 days in the new month as elapsed and not 5 days.
Accounting for when first working day in new Month is not Monday
Date: w/c 05/07/2021
e.g., if total chargeable hours worked on w/c 28/06/2021 = 24 hrs
assumption of hours per day worked during week = 24 hrs / 5 days = 4.8 hrs per day
2 days elapsed in Month = Thurs (01/07/2021) and Fri (02/07/2021)
Chargeable hours worked as of Monday 05/07/2021 = 4.8 hrs per day * 2 days elapsed in month = 9.6 hrs.
Ignoring the start of new Month will give instead
e.g. total chargeable hours worked on w/c 28/06/2021 = 24 hrs
assumption of hours per day worked during week = 24 hrs / 5 days = 4.8 hrs per day
5 days elapsed last week
chargeable hours worked as of Monday 05/07/2021 = 4.8 hrs per day * 5 days elapsed in month = 24 hrs.
The excel sheet attached has an example of input and final output would look like, an Alteryx input sheet and calendar mapping table that has actual elapsed days in a new month when the first working day of the month is not on a Monday
I would appreciate if somebody can help with a workflow that gets me from the input to a desired output.
tricky problem, open to ideas and solutions. Thanks EJ