Available Hours in Calendar Month

gkllc

New Member
Joined
Oct 22, 2020
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I 'thought' this would be easy but thus far I'm stymied. I have employees who work varying schedules. I know their total hours by day of the week that I need to calculate into monthly 'hours available' by month/by employee to then calculate how full their schedules are based on appointment visits.
For example
Sue works 32 hours per week that breaks out this way:
M - 10
T - 8
W - 2
Th -5
F - 7

John works 40 hours a week that breaks out
M - 9
T - 8
W- 9
Th - 6
Fr - 8

I'm trying to figure out what DAX formula would calculate total available hours calendar month hours

IE in Oct 2020 there were 4 Mondays, 4 Tuesdays, 4 Wednesdays, 5 Thursdays & 5 Fridays
Thus Sue would have 135 hours available and John would have 174 available hours....

Seems like this should be an easy 'thing' but thus I've not figured out how to get DAX to do what I'm asking.

Thanks in Advance
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
It’s relatively complex. How is your data for staff rosters stored? If I assume you have this data in a table like you imply (I will call it roster) you could create a many to many relationship between this roster table day of week to the day name in the calendar table (single filter direction from calendar to roster)

then you could write this. I think it will work - I haven’t tested it.

=SUMX(values(Calendar[day name]),CALCULATE(sum(roster[daily hours]) * countrows(calendar)))

put the months and years into rows, and the above measure into values.
 
Upvote 0
Yes employee data is in a table - name, total week hours, mon, tue, wed, thu, fri (each day total hours)

This looks like an interesting way to attack it. Hadn't thought about adding a calendar table but will do that and see if the math works. Will report back. Thanks for the idea...and letting me know it's not as simple as I thought it should be.
 
Upvote 0

Forum statistics

Threads
1,225,653
Messages
6,186,200
Members
453,340
Latest member
yearego021

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top