Functions Language

Top

The Top() function returns the first element of an array, or the first N elements when specified.

Related functions: Bottom


Syntax:

Top(Array, [No of rows])
  • In the Quintessence Editor (Studio) using Python language, use: Qx.Top()
 See parameter descriptions

ArrayThe input range.
No of rows
(optional)
How many elements to return, counting forward from the top of the array.

Remarks:

  • Default values:
    • No of rows: 1

Examples:

The examples provided below are based on fictitious data for illustrative purposes only.

> Example 1: Return top 2 values of an array


Range:

1
4
7

Formula:

return := Top(Range, 2); 

Result:

1
4