Set the actual cost for an activity in a tracking period. 

Setting the actual cost of an activity can be done in two ways, following the logic of the following formula: 

  • Actual Cost = Planned Actual Cost + Planned Actual Cost Deviation

The two parameters at the right hand side of this equation are as follows:

  • Planned Actual Cost (PAC): The planned actual cost is calculated automatically and cannot be changed by the user. This cost is based on the actual duration (AD, set in the P2Tracking:set_actual_duration function) input and is calculated as the total cost for the activity when it has been in progress for AD time units. Consequently, the actual duration estimate given by the user to estimate the total workload spent on an activity determines the actual cost for this activity. The Planned Actual Cost can be obtained using the P2Tracking:get_planned_actual_cost function.
  • Planned Actual Cost Deviation (PACDev): Since resources shift from time to time and work more or less efficient than originally planned, the real actual cost can differ from the planned actual cost where it is assumed that resources work as planned. Consequently, the actual cost deviation is a way to express that difference and changing the PACDev value has an impact on the total actual cost.

Consequently, setting the actual cost using the P2Tracking:set_actual_cost will automatically change the PACDev value and vice versa, changing the PACDev value using the P2Tracking:set_planned_actual_cost_deviation function will automatically change the actual cost for an activity. The value of the Planned Actual Cost Deviation can be obtained by calling the P2Tracking:get_planned_actual_cost_deviation function.

I/O Type Name Description
input integer ID activity ID
input float cost actual cost
input integer ID ID of the tracking period
Learn More: 

Step inside PMKC.

function ()