PthPercentil is a statistical function. With a probability of P percent, a value of fld will be below the value returned by this function.
PthPercentile( P, fld ) PthPercentile( P, fld, condFld ) PthPercentile( P, fld, condFld, cond )
P | A value between 0 and 100 as margin. |
---|---|
fld | The name of a field or array variable whose values should be used by this function. |
condFld | The name of the field that groups the values of fld (if fld isn't an array). |
cond | A string declaring the type of grouping to be used on condFld. This only makes sense for groups based on Date, DateTime, Time, and Boolean fields. See Summary Field Conditions for a list of strings you can use here. |
A number.
// this is a simple sample to understand the meaning of PthPercentile local numbervar array x := [1,2,3,4,5,6,7,8,9]; PthPercentile(40,x) //returns 4 because 40% of all values are below 4
// impact of the number of values on the result local numbervar array x := [1,2,3]; PthPercentile(33,x) // returns 1,5 because there are too few values in fld there is // no exact "border" value to return. // PthPercentile will return the average of the two nearest values.