LARGE (Values, N) LARGE (Values; N)

Values

The array from which the n th largest value is returned.

N

Number Number

The position of the value to return, in a version of the given array sorted in descending order.

Returns

The n th largest value in the given array, where n is given as the second parameter.

Returns the n th largest value in the given array, where n is given as the second parameter.

An array of temporal values is also accepted, in which case the n th latest temporal value is returned.

Examples

LARGE ({ 22, 5, 3, 14 }, 2)
LARGE ({ 22; 5; 3; 14 }; 2)

Returns 14, which is the second largest number in the { 22, 5, 3, 14 }{ 22; 5; 3; 14 } array.

INDEX ( SORT ({ 22, 5, 3, 14 }, SortOrder.Descending), 2)
INDEX ( SORT ({ 22; 5; 3; 14 }; SortOrder,Descending); 2)

Returns 14, which is the second largest number in the { 22, 5, 3, 14 }{ 22; 5; 3; 14 } array. This formula is equivalent to LARGE ({ 22, 5, 3, 14 }, 2) LARGE ({ 22; 5; 3; 14 }; 2). It first sorts the array in descending order, resulting in the array { 22, 14, 5, 3 }{ 22; 14; 5; 3 }, and then selects the second element of that array.

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell