Tagged: duaration task calendar
This topic contains 7 replies, has 3 voices, and was last updated by Thomas Boyle 4 months ago.
- 12/12/2018 at 5:56 pm #414327
I use task calendars a lot in my schedules. It seems like the default calendar in the options menu is driving the duration’s and not the task calendar. For example, the start date is 4/25/19 and the finish date is 5/17/19 and work is at 311 hours. The task calendar is Monday thru Friday 2 shifts at 10 hours per shift. Project is calculating the duration at 31 days but the duration should be 15.5 days. If I change the default calendar to suit this then the duration’s for other task’s with a different task calendar’s are changed as well.
What can I do in this situation?
Thanks,12/12/2018 at 9:10 pm #414329
I can’t tell from your question if you’re tasks have assigned resources. If yes, here’s something to consider.
Are the tasks with the task calendars set to ignore resource calendars? If not,the resource calendar could be restricting the amount of time a resource spends on the task. For example, if the task calendar indicates the task could be worked on M-F for 20 hours each day, but the resource calendar says the resource can only work 8 hours per day, the resource calendar will only allow the resource to be allocated to the task 8 hours a day, regardless of the task calendar. Checking the Ignore Resource Calendar option on the task tells project to disregard the resource constraints and schedule the task solely on the task calendar.
Hope that helps.12/13/2018 at 9:23 am #414333
I’m sorry I should’ve stated that earlier. Yes I do have Ignore Resource Calendar checked. Also the duration shows 31 days when from start to finish date is only 22 days.12/13/2018 at 10:37 am #414334
Notwithstanding the excellent points Darryl has made, I suspect your issue is a bit simpler.
In particular, when you specify a duration in “days,” it is always a prisoner of the project’s “Hours per day” setting in the Project Schedule Options. MSP computes and stores duration values in minutes, then it uses the project’s schedule settings to convert these minutes into (work) “days” which are ultimately variable. (Some other scheduling tools include these conversion factors as attributes of particular calendars rather than of particular projects; that approach has its own issues.)
It’s easy to make a task executing 311 hours of work at 20 hours/day and 5 days/week, starting on the afternoon of 25Apr’19 and finishing on the morning of 17May’19. The duration of that task is 311 hours. This converts to a 15.55-day or 31.1-day duration depending on the “Hours per day” setting (20 or 10 hrs/day, respectively). Apparently, your project is using 10 hours/day.
The “Duration” confusion is an unavoidable consequence of using variable task or resource calendars in MSP. There are two general ways to avoid or reduce the confusion:
a) Specify durations of tasks with non-standard working hours (either task or resource) in hours rather than days;
b) Use a custom duration field with a formula to display an alternate duration depending on the applied task or resource calendar. E.g. Duration1=IIf([Task Calendar]=”5dx2sx10h” Or [Resource Names]=”r-5dx20h”,[Duration]/2,[Duration])
Good luck, tom12/13/2018 at 11:43 am #414335
Thanks Thomas. Are those actual formulas that I can use?12/13/2018 at 2:39 pm #414336
Yes, if your 20-hour calendar is named “5dx2sx10h” and your resource is named “r-5dx20h,” and your Project Hours per day is in fact 10. BUT, you’ll need to re-type the quotation marks if you have copied directly from the post.
That formula is a one-off for the specific conditions you named. If you’ve used particular forethought in naming your calendars and resources, then you might try something a little more general, like this one, which a) Allows for multiple 20-hour calendars (e.g. 7d and 5d), and b) automatically factors the duration based on any value of Hours per day (not just 10):
IIf(InStr([Task Calendar],”20h”) Or InStr([Task Calendar],”2sx10h”) Or InStr([Resource Names],”20h”),[Duration]/(20*60/[Minutes Per Day]),[Duration]).
You could expand this same condition using nested IIfs or a Switch function to apply to all other hours-per-day calendars in the project – just copy and modify the “20” and “10” terms appropriately.02/13/2019 at 6:32 pm #414904
Been a little while since we talked about this. I have named my calendars 4d1s, 4d2s, 5d1s, 5d2s, 6d1s, 6d2s and 7d1s. All are 10 hour shifts. If I want my custom duration field to take into account the resource calendar, what would the nested formula need to be?
Daniel02/14/2019 at 10:59 am #414906
Your calendar names are easy to incorporate into Duration1=IIf(InStr(1,[Task Calendar],”2s”),[Duration]/(20*60/[Minutes Per Day]),[Duration]).
Re. resource calendars, you can’t reference them directly in a task custom field formula. (If its important for such things, then you either need to add an intelligent calendar-name extension to each resource name as I showed earlier, or do the whole thing with vba.)
Good luck, tom