Primavera P6 (XER) Calculated Fields

This topic contains information about .xer calculated fields.

To Calculate... Rules
Actual Cost / ACWP (AC)
Collect the following data:
  • Resource Units (sum of the act_reg_qty and the act_ot_qty of the activity's resource assignments)
  • Actual Labor Units (the activity's value for act_work_qty x 60)
  • Actual Non-labor Units (activities value for act_equip_qty)

Using the information above, find the rounded-off value (ceiling) using the following formula: (Actual Labor Units / 60) + Actual Non-Labor Units - Resource Units

The Actual Cost of the activity is calculated using the following formula:

SUM(Resource Assignments Actual Costs) + SUM(Project Expenses Actual Costs) + (<rounded off value that you calculated above> x def_cost_per_qty)

Actual Duration
  • If act_start_date is empty, then value is 0.
  • If last_recalc_date is empty, then value is 0.
  • If the activity has a calendar, use the calendar to convert the difference between the activity's act_end_date and the act_start_date to the correct duration units. If act_end_date is blank, then use last_recalc_date.
  • If the activity does not have a calendar, use the total number of minutes difference between the activity's act_end_date and the act_start_date. If act_end_date is blank, use last_calc_date.
At Completion Duration
  • Actual Duration + (the activities remain_drtn_hr_cnt x 60)
Budget Cost
Collect the following data:
  • Resource Units (sum of the resource assignments target_cost)
  • Budgeted Labor Units (value of the activity's target_equip_qty)
  • Budgeted Non-labor Units (value of the activity's target_equip_qty)

Using the information above, find the rounded-off value (ceiling) using the following formula: (Budgeted Labor Units / 60) + Budgeted Non-Labor Units - Resource Units

The Budget Cost of the activity is calculated using the following formula:

SUM(Resource Assignments'"target_cost") + SUM(Project Expenses target_cost) + (<rounded off value that you calculated above> x def_cost_per_qty)

Baseline Cost
  • If the project has a baseline: Actual Cost + Remaining Cost
  • If the project does not have a baseline, use Budget Cost
Baseline Duration
  • If the project has a baseline: get the baseline activity's budget duration value from: target_drtn_hr_cnt x 60
  • If the project does not have a baseline, get the current activity's budget duration from: target_drtn_hr_cnt x 60
Baseline Finish
  • If the project has a baseline: use the baseline activities Finish Date
  • If the project does not have a baseline, use the current activity's value for target_end_date
Baseline Start
  • If the project has a baseline: use the baseline activities Start Date
  • If the project does not have a baseline, use the current activity's value for target_start_date
Baseline Work
  • If the project has a baseline: act_work_qty + remain_work_qty
  • If the project does not have a baseline, use the current activity's target_work_qty x 60
Percent Complete
  • If complete_pct_type has a vlue of CP_Phys, then the value is Phys_complete_pct
  • If complete_pct_type has a value of CP_Drtn, then the value is Duration Percent Complete which is calculated as follows:
    • If activity status is Planned, then the value is 0
    • If activity status is Complete, then the value is 100
    • If activity status is In Progress, then:
      • If target_drtn_hr_cnt is empty, or if remain_drtn_hr_cnt is greater than target_drtn_hr_cnt, then value is 0
      • Otherwise, use the following formula:

        1 - [("remain_drtn_hr_cnt" / "target_drtn_hr_cnt") * 100]

BCWP (EV)

(Baseline Cost) * (Percent Complete / 100)

See Baseline Cost and Percent Complete rows above for their respective formulas.

BCWS (PV)
  • If the current activity's Baseline Start, Baseline Finish, or Project Time Now are empty, or if Baseline Start is later than or the same as Project Time Now, then the value is 0.
  • If the current activity's Baseline Finish is earlier than or the same as Project Time Now, then the value is the activity's Baseline Cost.
  • If the current activity does not have a calendar, then:
    • Dividend = number of ticks between the Project Time Now and the Baseline Start Date.
    • Divisor = number of ticks between the Baseline Finish Date and Baseline Start Date.
  • If the current activity does have a calendar, then:
    • Dividend = difference between the Project Time Now and the Baseline Start Date in the correct working units.
    • Divisor = difference between the Baseline Finish Date and Baseline Start Date in the correct working units.
  • If the Divisor is 0, then the value is the activity's Baseline Cost.
  • If the Divisor is not 0, then the value is calculated as follows:

    ("Dividend" / "Divisor") * ("Baseline Cost")

Critical Flag
  • If act_end_date is not empty, or total_float_hr_cnt is empty, or task_type is TT_LOE, then the value is False.
  • If critical_path_type is set to CT_TotFloat, and total_float_hr_cnt is less than or equal to the value of (critical_drtn_hr_cnt x 60), then the value is True, otherwise the value is False.
Duration Percent Complete
  • If status_code is Planned, then the value is 0.
  • If status_code is Complete, then value is 100.
  • If target_drtn_hr_cnt is empty or 0, then value is 0.
  • If remain_drtn_hr_cnt is greater than target_drtn_hr_cnt, then value is 0.
  • If none of the above apply, then value is calculated as follows:

    [1 - ("remain_drtn_hr_cnt" / "target_drtn_hr_cnt")] * 100

Remaining Cost
Collect the following data:
  • Resource Units (sum of the activity's resource assignments remain_qty)
  • Remaining Labor Units (value of the activity's remain_work_qty x 60)
  • Remaining Non-labor Units (value of the activity's remain_equip_qty)

Using the information above, find the rounded-off value (ceiling) using the following formula: (Remaining Labor Units / 60) + Remaining Non-Labor Units - Resource Units

The Remaining Cost of the activity is calculated using the following formula:

SUM(Resource Assignments' Remaining Costs) + SUM(Project Expenses' Remaining Costs) + (value in (d) times "def_cost_per_qty")

EAC / Total Cost
  • Actual Cost + Remaining Cost

See Actual Cost and Remaining Cost rows above for their respective formulas.

Earned Value Technique
  • If the activity does not have a WBS, then the value is empty.
  • If WBS' EVT value is EC_MS, then the value is Milestone.
  • If WBS' EVT value is EC_Cmp_pct, then the value is Percent Complete.
  • If WBS' EVT value is EC_50_pct, then the value is Fifty Fifty.
  • If WBS' EVT value is EC_0_pct, then the value is Zero Hundred.
  • If WBS' EVT value is EC_User_pct, then the value is User Defined.
  • If none of the above apply, then the value is Percent Complete.
Earned Value Work
  • (Baseline Work x Percent Complete) / 100

See Baseline Work and Percent Complete rows above for their respective formulas.

Finish Date
  • If act_end_date is not empty, then the value is act_end_date.
  • If act_end_date is empty, then the value is target_end_date.
Start Date
  • If act_start_date is not empty, then the value is act_start_date.
  • If act_start_date is empty, then the value is target_start_date.
Is Level of Effort
  • If remain_drtn_hr_cntis 0, then the value is True, otherwise the value is False.
Remaining Duration Elapsed
  • If task_type is Level of Effort, then the value is True, otherwise the value is False.
Maximum Lag
  • Largest value of Lag from the activity's list of successors.
Minimum Lag
  • Smallest value of Lag from the activity's list of successors.
Number of FS Predecessors
  • Find the number of activity predecessors that have a link type of Finish to Start.
Number of FS Successors
  • Find the number of activity successors that have a link type of Finish to Start.
Number of SS Predecessors
  • Find the number of activity predecessors that have a link type of Start to Start.
Number of SS Successors
  • Find the number of activity successors that have a link type of Start to Start.
Number of SF Predecessors
  • Find the number of activity predecessors that have a link type of Start to Finish.
Number of SF Successors
  • Find the number of activity successors that have a link type of Start to Finish.
Number of FF Predecessors
  • Find the number of activity predecessors that have a link type of Finish to Finish.
Number of FF Successors
  • Find the number of activity successors that have a link type of Finish to Finish.
Number of Lags
  • Find the number of activity predecessors that have a positive value of Lag.
Number of Leads
  • Find the number of activity predecessors that have a negative value of Lag.
Number of Predecessors
  • Find the number of activity predecessors.
Number of Successors
  • Find the number of activity successors.
Planned Value Work
  • If the current activity's Baseline Start, Baseline Finish, or Project Time Now is empty, or if Baseline Start Date is later than or the same as Project Time Now, then the value is 0.
  • If the current activity's Baseline Finish is earlier than or the same as the Project Time Now, then the value is the activity's Baseline Work.
  • If the current activity does not have a calendar, then:
    • Dividend = number of ticks between the Project Time Now and the Baseline Start Date.
    • Divisor = number of ticks between the Baseline Finish Date and Baseline Start Date.
  • If the current activity does have a calendar, then:
    • Dividend = difference between the Project Time Now and the Baseline Start Date in the correct working units.
    • Divisor = difference between the Baseline Finish Date and Baseline Start Date in the correct working units.
  • If the Divisor is 0, then the value is the activity's Baseline Work.
  • If the Divisor is not 0, then the value is calculated as follows:

    ("Dividend" / "Divisor") * ("Baseline Work")

Status Date
  • If last_recalc_date is empty, then the value is plan_start_date.
  • If last_recalc_date is earlier than plan_start_date, then the value is plan_start_date.
  • If neither of the above is true, then the value is last_recalc_date; however, if there is an activity in the project with the Start date that is earlier than the above values, then the value for the Status Date is the earliest activity's Start Date.
Remaining Earned Work
  • (Baseline Work)*[(100-Percent Complete)/100]

See the Baseline Work and Percent Complete lines above for their respective formulas.

Schedule % Complete
  • If the current activity's Baseline Start, Baseline Finish, or Project Time Now is empty, or if Baseline Start is later than or the same as Project Time Now, then the value is 0.
  • If the current activity's Baseline Finish is earlier than or the same as the Project Time Now, then the value is 1.
  • If the current activity does not have a calendar, then:
    • Dividend = number of ticks between the Project Time Now and the Baseline Start Date.
    • Divisor = number of ticks between the Baseline Finish Date and Baseline Start Date.
  • If the current activity does have a calendar, then:
    • Dividend = difference between the Project Time Now and the Baseline Start Date in the correct working units.
    • Divisor = difference between the Baseline Finish Date and Baseline Start Date in the correct working units.
  • If the Divisor is 0, then the value is 1.
  • If the Divisor is not 0, then the value is calculated as follows:

    ("Dividend" / "Divisor")

Start Percentage
  • If the activity does not have a WBS, then the value is empty; otherwise, value is WBS.
Total Duration
  • act_drtn_hr_cnt + (remain_drtn_hr_cnt x 60)
Total Work
  • (act_work_qty + remain_work_qty) x 60
Units Percent Complete
  • If status_code is Planned, then the value is 0.
  • If status_code is Complete, then the value is 100.
  • If both act_work_qty and remain_work_qty are empty or 0, then the value is 0.
  • If remain_work_qty is not empty or 0, and act_work_qty is 0, then the value is 0.
  • If none of the above is true, then the value is calculated as follows:

    [1 - ("remain_work_qty" / ("act_work_qty" + "remain_work_qty"))] * 100

WBS
  • If the activity as a WBS, then the value is the WBS' generated GUID.
WBS Code
  • If the WBS has a parent node (parent_wbs_id), then the value is calculated as follows: Parent Path.wbs_short_name

where Parent Path follows the same format as above (Parent Path.wbs_short_name).

CPI-Labor Units
  • (Earned Value Work) / (act_work_qty * 60)

See the Earned Value Work line above for its formula.

SPI-Labor Units
  • (Earned Value Work) / (Planned Value Work)

See the Earned Value Work and Planned Value Work lines above for their respective formulas.

Variance - BL Finish Date
  • If Finish Date is empty, then the value is empty.
  • If the project has a baseline, calculate the time difference between the Baseline Finish and the activity's Finish Date using the activity calendar to convert the duration to the correct working units (if a calendar exists), or to the total number of minutes if the activity's calendar does not exist.
  • If the project does not have a baseline, calculate the time difference between the activity's target_end_date and the activity's Finish Date using the activity calendar to convert the duration to the correct working units (if a calendar exists), or to the total number of minutes if the activity's calendar does not exist.

See the Finish Date line above for its formula.

Variance - BL Start Date
  • If Start Date is empty, then the value is empty.
  • If the project has a baseline, calculate the time difference between the Baseline Start and the activity's Start Date using the activity calendar to convert the duration to the correct working units (if a calendar exists), or to the total number of minutes if the activity's calendar does not exist.
  • If the project does not have a baseline, calculate the time difference between the activity's target_start_date and the activity's Start Date using the activity calendar to convert the duration to the correct working units (if a calendar exists), or to the total number of minutes if the activity's calendar does not exist.

See the Start Date line above for its formula.

Touchstone reads external relationships and external activities. This makes the count of relationships more accurate for metrics. External activities from P6 XER schedule or MPP schedules are now part of the list of activities used in calculating a score for an uploaded schedule unless metrics exclude external activities. External activities, however, are excluded from the random selection of activities used in determining the Project Critical Path Test and Logic Sensitivity.