### PthPercentile (P, fld), PthPercentile (P, fld, condFld), PthPercentile (P, fld, condFld, cond)

Basic and Crystal syntax.

##### Arguments

- P is any integer between 0 and 100.
- fld is any Number or Currency field that can be evaluated by the function.
- condFld is a field used to group the values in fld by.
- cond is a String indicating the type of grouping for condFld. You only specify this argument when condFld is a Date, Time, DateTime or Boolean field.

  For more information on the valid strings for this argument, see Conditions for summary functions.

##### Returns

Number or Currency value.

##### Action

Calculates the value for a specified percentile (P) in a Number or Currency field.

##### Examples

The following examples are applicable to both Basic and Crystal syntax:

`PthPercentile(20, {Customer.LAST YEAR'S SALES})`

Returns $2302 as the value at the 20th percentile (if 20% of {Customer.LAST YEAR'S SALES are less than $2302

`PthPercentile(P, {Customer.LAST YEAR'S SALES}, {Customer.REGION})`

Groups the Last Year's Sales field by region and returns the value at percentile P in the Last Year's Sales field per region.

`PthPercentile(P,{orders.ORDER AMOUNT}, {Customer.REGION}, "monthly")`

Groups values in the Amount field by region, then returns the value at percentile P in the Amount field for each region, per month.

##### Comments

P = 50 (the 50th Percentile) is the same value returned by the Median (fld), Median (fld, condFld), Median (fld, condFld, cond) function (the median value).

Note: Using this function in a formula forces the formula to be evaluated at print time.

For more information on evaluation time considerations, see Evaluation Time functions.

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com