SELECT
The SELECT function returns the range of cells between the start and end columns of a specified measure. It should be used in conjunction with an aggregate function such as SUM, AVERAGE, RANK, etc.
Syntax
SELECT(measure,start_column,end_column)
Arguments
measure - String. Specify the measure name for which the data range must be retrieved. Leaf-level cells will be taken.
start_column - Number. The starting column index from which the data must be fetched (1-based indexing). Required.
end_column - Number. The index of the ending column until which data has to be retrieved. Optional. If left blank, only the data from the start_column will be returned.
Return value
Range of data.
Example
SELECT([Sales],1,3)
//Returns the range of cells between the first and the third column of the 'Sales' measure
SUM(SELECT([Sales],1,3))
//Calculates the sum of values from the first through third columns of the 'Sales' measure
In the example below, we used the SELECT function to determine the rank of multiple categories. The rank is derived from the first through fifth columns of the 'Sales' measure.

Last updated
Was this helpful?