MPERn returns the nth monthly percentile value of a specified variable.
SYNTAX:
MPERn(Cx, optional Time Increment)
where :
Cx is a conditional variable x
Time Increment Optional - specifies the source variables (Cx) Frequency when the Source Variable (CX) and target variable's (i.e. the variable being calculated) frequencies do not match.
n specifies the percentile to calclulate
NOTES:
n, being a percentile, must be between 1 and 100.
The result is stored based on target variables frequency:
The value to use from each month is calculated using the following equation:
(Number of Samples) * (Percentile Desired) / 100
The value is then rounded to the nearest whole number using Scientific Rounding. This number determines which "slot" to use if all values for the month are sorted into slots from lowest to highest value.
EXAMPLE 1: Return the nth monthly percentile from a variable
Source variable (70) is set to Daily and Target variable (118) is also set to Daily. Because both the Source and Target variables are the same (Daily), the time increment BYDAY will be used.
V118 = MPER85(C70)
In this example, variable 118 will contain the monthly 85th percentile value of variable 70 and the result will be stored on the last day of the month:
EXAMPLE 2: Return the nth monthly percentile from an Hourly variable into a Daily Calculation.
Source variable (70) is set to Hourly and Target variable (120) is set to Daily.
V70 - Is a hourly parameter
V120 - Is a daily calculation
V120 = MPER85(V70,BYHOUR)
Note: You MUST specify the Time Increment (BYHOUR) that matches the source variables frequency (IE the source variable V70 is Hourly, therefore we specify BYHOUR) in order for the function to return the correct value.
See: Working with Daily Detail Variables in Calculations.