Basic aggregation functions are a group of the most common aggregation functions.

Use the drop-down on each function to see a brief description and the syntax of each function. Click the function name in the syntax description for further details.

Basic aggregation functions in the load script

The sorted values are iterated over
a number of records, as defined by a group by clause, or aggregated across the full data set if no group by clause is defined.

firstsorted([
distinct ] expression , sort-weight
[, n ])

Max() finds the highest numeric value of the aggregated data in the expression, as defined by a group
by clause. By specifying a rank n, the nth highest value can be found.

Min() returns the lowest numeric value of the aggregated data in the expression, as defined by a group
by clause. By specifying a rank n, the nth lowest value can be found.

Mode() returns the most commonly-occurring value, the mode value, of the aggregated data in the expression, as defined by a group by clause. The
Mode() function can return numeric values
as well as text values.

Only() returns a value if there is one and only one possible result from the aggregated data. If the records within each grouped result as defined by the group by clause contains only one value, then that value is returned. Otherwise NULL is returned

Chart aggregation functions can only be used on fields in chart expressions. The argument expression of one aggregation function must not contain another aggregation function.

FirstSortedValue() returns the value from the expression specified in value that corresponds to the result of sorting the sort_weight argument, taking into account rank, if specified. If more than one resulting value shares the same sort_weight for the specified rank, the function returns NULL.

Mode() finds the most commonly-occurring value, the mode value, in the aggregated data. The Mode() function
can process text values as well as numeric values.

Only() returns a value if there is one and only one possible result from the aggregated data. For example, searching for the only product where the unit price =9 will return NULL if more than one product has a unit price of 9.

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com