The NARY_MAX function returns the maximum value of the input arguments.

NARY_MAX is similar to MAX, except it allows you to compare multiple values.

In this article:


NARY_MAX(X, Y, [,Z]*)

Output type

By default, NARY_MAX returns an unaggregated dimension.


Example 1

This example shows how you can mix fields, calculations, and literals in an NARY function:


Example 2

Suppose you want to determine the maximum sales for your 3 sales regions by date and your data looks like this:

Date Region 1 Sales Region 2 Sales Region 3 Sales
Apr 17, 2018 100 200 150
Apr 18, 2018 75 130 150
Apr 19, 2018 225 185 230

You could use the NARY_MAX function to determine the maximum sales for a given date:

NARY_MAX(Region 1 Sales, Region 2 Sales,Region 3 Sales,)

Date NARY_MAX calculated field
Apr 17, 2018 200
Apr 18, 2018 150
Apr 19, 2018 230


NARY_MAX requires at least 2 arguments.

At least one argument must be a field or an expression containing a field.

All arguments must be of the same semantic type, i.e., all numbers. For example you can't perform an NARY function on a number, a text field, and a date.

Related resources

Was this helpful?
How can we improve it?