AVERPER1

This function computes an average that is based on period values. The principle is that the period values are first calculated according to the same rules as for VALPER. In the second step, the average is calculated on the PER values. The number of periods are used in division, no matter if there are any values in each period or not. This function is suitable for profit and loss accounts.

Syntax: AVERPER1 (account, actuality, period, number of periods/start period)

Specify a start period in the relative format (for example 'N112' or 'P001') to create a dynamic interval. Or specify the number of periods to always use the same number of periods in the calculation.

IBM® Cognos® Controller uses the start period in combination with the period argument to determine the number of periods to include in the average calculation each time you run the function. If you set period to '+0' and start period to 'P001', then the average calculation starts from the first period of the financial year (P001) and ends with the current period (+0). The current period is the period that you select at run time.

Missing data is interpreted as zeros. The next table shows the result for AVERPER1(#account#, AC, +0, 4). P-3 is the closing period.

Table 1. YTE values
Dim combination PER-4 PER-3 PER-2 PER-1 PER AVERPER1
EU CAR 5     5 10  
EU BIKE   3 2   4  
US CAR     5 10    
US BIKE 11 12 1 2 3  
Table 2. PER values
Dim combination PER-4 PER-3 PER-2 PER-1 PER AVERPER1
EU CAR   -5   5 5 1.25
EU BIKE   3 2 -2 4 1.75
US CAR     5 5 -10 0
US BIKE   1 1 1 1 1