The CALCAVEPAY function can be used to calculate an employee's pay over a number of pay periods.  It takes 3 parameters, two of which are mandatory and the last of which is optional.  The three parameters are:
  1. The pay relationship(s) you want to include in the averaging calculation (mandatory)
  2. The number of pay periods to calculate the average over (mandatory)
  3. Option for how the calculation is done (optional)
You can include as many pay elements as you like in the first parameter.  The field numbers or short names go inside single quotes, like 'F500' if your salary field is F500.  To use multiple fields, split the fields with commas, inside the same single quotes, like 'F500,F510,F520,F1000'.

The number of pay periods to calculate the average over should be fairly self-explanatory.  Normally you'd want 52 for weekly pay or 12 for monthly pay.

The option for how it's calculated can be one of four things:
  1. Blank, which means do a straight calculation over the number of pay periods specified
  2. P, which means use the last N payments rather than the last N pay periods.
  3. Q, which means use the last N payments where the value being added up is not 0
  4. S, which means use the last N pay periods without statutory payments (SMP, SPP, etc).
So to get the average pay for field 500 over the last 12 pay periods where the value being added up is not 0, you'd use:


And to get the average of the last 52 weeks for fields 500, 600, 700 and 800 where, skipping weeks with statutory payments in, you'd use


You can also use the CALCAVEPAY function to calculate average hours, just use the hours fields in the first parameter instead if the pay value fields.
    • Related Articles

    • Adding a pay rise in Flexipay

      You can process pay rises in Flexipay by opening the Maintain pay rises window. Click System in the Flexipay tool bar, and click Maintain pay rises. First, add a pay rise by clicking the Add button. Second, select the element(s) of pay that you want ...
    • Holiday pay calculation changes

      From April 2020, the holiday pay calculation will be changed from a 12-week average to a yearly 52-week average. As a result, this will update custom calculations that use the existing HOLPAY calculation functions.  Note: Custom calculations using ...
    • Flexipay RTI

      Introduction  This document contains information on the different aspects of RTI including preparation, procedures, and changes that were added within Flexipay version 2.32 and reference material. The Real time information section provides ...
    • Setting up a cycle to work scheme in Flexipay

      Introduction It is possible to set up a cycle to work scheme within Flexipay.  This article shows you how. Setting up a cycle to work scheme in Flexipay There are two parts to this - creating a loan, and making the deductions salary sacrifice. Use ...
    • Calculate average holiday pay - 52 weeks

      Legislation is changing in April 2020 so that holiday pay is calculated over a 52-week period, rather than a 12-week period. Previously, six functions were available to return holiday pay values based on a 12-week reference period. These functions ...