You are viewing content for 5.0 | 4.9 | 4.8 | 4.7 | 4.6 | 4.5 | 4.4 | 4.3 | Previous Releases


max

Returns the maximum value in a column.

Examples

Find the maximum number sold.

max(Sales_Acme.Sales.AMOUNT_SOLD)

Find the maximum number sold, categorized by city.

max(Sales_Acme.Sales.AMOUNT_SOLD, groupBy(Sales_Acme.Sales.CITY))

Syntax

max(double expr, [groupBy(...)]))
  • expr : expression returning double
  • groupBy : optional grouping function

    Returns

    double or as many doubles as there are groups if groupBy is used.

Notes

You must include all the leading grouping dimensions in the Insight from the top-down to the level-based measure you want to evaluate. See Aggregation with Level Based Measure in Aggregating Functions.


© Incorta, Inc. All Rights Reserved.