### NthSmallest (N, fld), NthSmallest (N, fld, condFld), NthSmallest (N, fld, condFld, cond)

Basic and Crystal syntax.

##### Arguments

- N is any integer.
- fld is any valid database or formula 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

Fractional Number

##### Action

Determines the Nth smallest value in a given field, either for the entire report or for each instance of the (condFld) group.

##### Examples

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

`NthSmallest (1, {Customer.CUSTOMER ID}`

Returns 12, where the Customer ID field contains numerical values ranging from 12 to 50.

`NthSmallest(1, {Customer.CUSTOMER NAME}, {Customer.REGION})`

Returns the least value in the Customer Name field, per region.

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

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

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