Forum Discussion
Rounding of partial percentage of a workday
- Mar 09, 2021
Your example is not clear. For example, you say the status report is a 1hr task but then you assign James to the task at 12.5%. That means he has a work content of .125 hours, not 1 hour. Is that your intent? If so, is the task type then fixed duration?
How exactly did you enter the assignments for James (i.e. what view field or form)?
Why are you bouncing the resource's assignment back and forth between 12.5% and 10%?
Something else that you should realize is that the resource rate is not $50/hr when the work is less than an hour, it is really .83333333 cents per minute. When the 12.5% assignment is initially entered it goes in as 7.5 minutes giving a cost of $6.4999999. And when the assignment is changed to 10%, the cost ends up being $4.99999. Somewhere in all those calculations round-off errors will accumulate and that is essentially what happens when the assignment goes back to 12.5%, it is no longer processed as 7.5 minutes but is rounded to 8 minutes and hence the cost ends up $6.67 instead of $6.25. Can you force the calculation back to 7.5 minutes? Yes. You can delete the resource and re-enter the original values or you can open the Visual Basic Editor window in Immediate and enter this line of code
activeproject.Tasks(1).Resources(1).assignments(1).Work=7.5
John
Your example is not clear. For example, you say the status report is a 1hr task but then you assign James to the task at 12.5%. That means he has a work content of .125 hours, not 1 hour. Is that your intent? If so, is the task type then fixed duration?
How exactly did you enter the assignments for James (i.e. what view field or form)?
Why are you bouncing the resource's assignment back and forth between 12.5% and 10%?
Something else that you should realize is that the resource rate is not $50/hr when the work is less than an hour, it is really .83333333 cents per minute. When the 12.5% assignment is initially entered it goes in as 7.5 minutes giving a cost of $6.4999999. And when the assignment is changed to 10%, the cost ends up being $4.99999. Somewhere in all those calculations round-off errors will accumulate and that is essentially what happens when the assignment goes back to 12.5%, it is no longer processed as 7.5 minutes but is rounded to 8 minutes and hence the cost ends up $6.67 instead of $6.25. Can you force the calculation back to 7.5 minutes? Yes. You can delete the resource and re-enter the original values or you can open the Visual Basic Editor window in Immediate and enter this line of code
activeproject.Tasks(1).Resources(1).assignments(1).Work=7.5
John
Hi
Thank you for responding. Help much appreciated.
What I am doing is I have a Status Report task which is a 1hr task. I am assigning it to James Bond to do this job. In the resource sheet for James I have his hourly rate as $50/hr and he works 100% of his time which 8hrs per day.
Now when I assign James to this task Status Report, I double click on that task and Task Information panel appears and I go to Resource Tab I select, James Bond, under Resource Name and type 12.5% in units col. Immediately it displays 13% (this is fine as MS project rounds up the display ) and cost value shown is $6,25 which is correct 0.125x$50 =$6.25. Why 12,5% because 1hr of work - 0.125 x 8hr = 1hr.
The problem happens when I change it to 10% and back to 12,5% in which case it no longer calculates the last change as 0.125 x $50 but 0.13 x %50 = $6.50
Why am I bouncing between 12,5% to 10% and back to 12.5% is because I am just testing to see it is consistent in its calculation.
Each time I made the change I double click the task Status Report and change it in the Task Information -> Resource tab. Hope I am doing the update correctly!
Hope I made the above clear on what I am doing.
Best Rgds
Kish
- John-projectMar 11, 2021Silver Contributor
Yes I do see your reply.
Your assumption is incorrect. Assigning James at 12.5% to a 1 hour task results in a task work content of .125 hours (rounded to .13h), not 1 hour. The work content is based on the task duration, not the resource's max units. You can readily see this in this sample.
As far as why Project gives a slightly different result when a odd value assignment is switched back and forth, I explained in my last response.
John
- Kish27Mar 16, 2021Copper Contributor
Hi
I went back and re-checked and did the same thing as u presented above and found out that you are write my original assumption was flawed as I got mixed up with duration and resource max unit. I have corrected what needs to be done.
Thanks a lot for clarifying this mistake.
This now close and resolved
Kish- John-projectMar 16, 2021Silver ContributorKish,
You're welcome and thanks for the feedback.
John