Home > FAQ > Data Manipulation > Editing Arrays > Annualize reported salaries

Annualize reported salaries

This example assumes that we want to annualize salaries when only one salary is reported each year and the start/stop dates reflect the actual period over which the salary was earned. For example, if a salary is reported as 1/1/yyyy, 6/30/yyyy, $25000, then the full annual salary would have been $50,000.


B_DT:= #START salary & ; start dates
E_DT:= #STOP  salary & ; stop dates
V:=    #VALUE salary & ; values (i.e., the reported salaries)

; annualize reported salaries
; (assumes each pair of start/stop dates are in the same calendar year)
BOY_DT:= (-12) #MONTHROUND B_DT &
EOY_DT:= #ENDMTH (BOY_DT #DATEPLUS 360D) &

G:= (1 + EOY_DT - BOY_DT) #DIV (1 + E_DT - B_DT) &
; gross-up fraction based on calendar days:
;   days in the year / days covered by start/stop

V1:= V * B_DT & ; annualize (gross-up) the salary

11 #ARRAY(BOY,EOY,V1) ; create a start/stop array: (start,stop,values)