Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

max

Focus mode
max - Amazon QuickSight

The max function returns the maximum value of the specified measure or date, grouped by the chosen dimension or dimensions. For example, max(sales goal) returns the maximum sales goals grouped by the (optional) chosen dimension.

Syntax

max(measure, [group-by level])

Arguments

measure

The argument must be a measure or a date. Null values are omitted from the results. Literal values don't work. The argument must be a field.

Maximum dates work only in the Value field well of tables and pivot tables.

group-by level

(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or dimensions independent of the dimensions added to the visual.

The argument must be a dimension field. The group-by level must be enclosed in square brackets [ ]. For more information, see LAC-A functions.

Examples

The following example returns the max sales value for each region. It is compared to the total, minimum, and median sales values.

max({Sales})
The maximum sales value for each region.

You can also specify at what level to group the computation using one or more dimensions in the view or in your dataset. This is called a LAC-A function. For more information about LAC-A functions, see LAC-A functions. The following example calculates the max sales at the Country level, but not across other dimensions (Region) in the visual.

max({Sales}, [Country])
The maximum sales value in each country.
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.