Home > FAQ > Service Definitions > How can I project hours using the previous 12 months

How can I project hours using the previous 12 months

QUESTION: ProAdmin projects hours using the last fully reported plan year or the reported hours in the last plan year, grossed-up to a full year. My client wants to project hours when performing projection calculations. Hours are reported at month end service is defined as hours worked in a plan year divided by 1800 to a maximum of 1 year. My client would like to sum the hours in the last 12 months worked and use this amount to project hours. How can ProAdmin do this?

My Service Definition uses the hours conversion expression: 1 #min [#this/1800], where the measurement period is a plan year.

ANSWER: The special hours projection is done in the same hours conversion expression. Because the measurement period is a plan year, values in #THIS are accumulated for each plan year. We need to get the net values of this array to select the last 12 values. That is the last 12 months of hours from the data.

  1. First setup a date field (LastDate) which is defaulted to the last date of the input array: 2 #EFFDATE hours.

  2. At this point ProAdmin has determined which dates go into the operator #DATE. This includes month ends and other dates ProAdmin deems important. Summed amounts on a plan year basis are present through the operator #THIS. Keeping these two thought in mind, the expression can be developed:

MonthlyValues := 1 #MPNET #THIS & ; takes the accumulated values and nets
; them ; out by plan year on a monthly
; basis
Start_12:= LastDate #dateminus 1y & ; Start12 is the date which is 12
; months before the last date on
; the array.
In12Months:= (Start_12 < #DATE) and (#DATE <= LastDate) & ; 1 if between the Start_12 and
; LastDate, 0 otherwise
A := MonthlyValues * In12Months & ; provides the last 12months of hours
SumA := 0 #MPSUM A & ; sums up the 12 months of hours
AverageA := SumA / 12 & ; gets the average over the last 12
; months. This is the monthly amount we
; want to project.
DaysInMonth := #DAYSINMTH #DATE & ; gets the number of days in the month
DayDate := #DAY #DATE & ; gets the day of the month
B:= #IF #date <= LastDate #then MonthlyValue #ELSE AverageA * (DaysInMonth = DayDate) #ENDIF & ; use regular monthly values if the
; date is on or before LastDate because
; #DATE has many dates, make sure that
; only end of months ; get a value
C:= 1 #MPSUM B & ; provides annual plan year amounts
1 #MIN [C / 1800] ; provides the plan year service