AVERPER2
Syntax: AVERPER2 (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 so that 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 blank. The next table shows the result for AVERPER2(#account#, AC,+0, 4). P-3 is the closing period.
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 |
Dim combination | PER-4 | PER-3 | PER-2 | PER-1 | PER | AVERPER1 |
---|---|---|---|---|---|---|
EU CAR | -5 | 5 | 5 | 1.67 (5/3) | ||
EU BIKE | 3 | 2 | -2 | 4 | 1.75 (7/4) | |
US CAR | 5 | 5 | -10 | 0 (0/3) | ||
US BIKE | 1 | 1 | 1 | 1 | 1 (4/4) |