Site icon i2tutorials

Amazon QuickSight – maxOver

Amazon QuickSight – maxOver

 

Amazon QuickSight’s maxOver() function is used to compute the maximum value of a measure within a specified partition. It operates on a measure and allows you to calculate the maximum value for a given dimension or a group of dimensions.

 

Syntax

#Start#
maxOver
(
     measure 
     ,[ partition_field, ... ] 
     ,calculation level 
)
#End#

 

This function takes the following arguments:

 

 

 

Suppose you have a dataset of sales transactions with columns for product, region, and sales amount. You want to find the maximum sales amount for each product category, regardless of the region.

 

You can use the maxOver() function as follows:

Example

#Start#
maxOver(Sales, [Product], Detail)
#End#

 

This will return the maximum sales amount for each product category, with the calculation performed at the detail level. If you wanted to see the maximum sales amount for each product category within each region, you could modify the function as follows:

 

Example

#Start#
maxOver(Sales, [Product, Region], Detail)
#End#

 

This will return the maximum sales amount for each product category within each region, with the calculation performed at the detail level.

 

Exit mobile version