Amazon QuickSight – minOver
The minOver function in Amazon QuickSight is a table calculation function that allows you to find the minimum value of a measure within a specified window of data. This function can be useful for identifying the lowest value of a measure in a particular time period or category.
Syntax
#Start# minOver ( measure ,[ partition_field, ... ] ,calculation level ) #End#
This function takes the following arguments:
- measure: the measure for which you want to find the minimum value.
- partition_field: one or more fields to partition the data. If specified, the minimum value will be calculated separately for each partition.
- calculation level: the level of detail at which the function should be calculated. This can be specified as a number, which represents the number of rows before and after the current row to include in the window, or as an expression that evaluates to a number.
Suppose you have a dataset that contains sales data for different regions and time periods, and you want to find the minimum sales value for each region. You could use the following minOver function:
Example
#Start# minOver( sum(Sales), [Region], ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) #End#
This function calculates the minimum sales value (sum(Sales)) for each region ([Region]), using all the rows in the partition (ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING). The result would be a table showing the minimum sales value for each region.