Skip to content

MinBy

Description

MinBy returns the value associated with the minimum value of a sort expression.

Syntax

MinBy(value, sort_expression)

Parameters

Parameter Required Type Description
value Yes Field or expression Value to return.
sort_expression Yes Field or expression Expression used to find the minimum row.

Notes

Aggregate functions are commonly used in metric definitions and grouped query results.

Example

MinBy(ProductName, SalesAmount)

The expression returns the calculated result according to the current query context.