1. Calculation functions
  2. All Functions
  3. Aggregation Functions
  4. x[MIN:y]

Returns the minimum value of a line item from a source module. The source and result module must both use the line item as a dimension: the source uses the dimension as a list-formatted line item.

Syntax

x[MIN:y]

where:

  • x: line item to search for a minimum value
  • y: list item to use as criteria for the search

Format

Input Format Output Format

x: Line item

y: ListItem

Matches the data format used by argument x

Arguments

The function uses the following arguments:

  • x: number, date, or time period-formatted source line item.
  • y: list-formatted source line item.

Constraints

The function has the following constraints:

  • Two parameters are required.
  • Result formatting must match the source formatting of the x parameter.
  • The result or target line item must share a dimension with the list used to format the source y parameter line item.

Excel equivalent

  • No Excel equivalent

Back to Top

Example

Back to Top

MIN as an Aggregation Function

When used as an aggregation function, MIN returns the minimum value of the source line item x for data that matches criteria in a second line item formatted with list y.

Lowest numerical value

A Pay Details source module shows staff pay and city work location. The module has a list dimension on Rows for Employees. Two line items are on Columns: Pay is number-formatted and City is list-formatted on a City Location list:

A Maximum & Minimum Pay Levels results module has the City Location list as a dimension on Columns. We can then use MIN in a Minimum Pay for City number-formatted result line item to show the minimum pay level at each city work location:

Pay Details.Pay[MIN: Pay Details. City]        

Earliest Date

If we add a Start Date date-formatted source line item added to the Pay Details source module, ee can use MIN in the same results module that has City Locations applied as a dimension on columns.

The Earliest Start Date for City date-formatted result line item returns the earliest start date for an employee at each city location:

Pay Details.Start Date[MIN: Pay Details. City]
		

Note that MIN returns an effectively infinite date value of 31/12/2399 in the result for Los Angeles, York and Lyon—this is because there are no selections for these cities in the City source line item, that is formatted on the City Location list.

If we add a Start Month time period-formatted for months source line item to the Pay Details source module:

Earliest date per location

We can again use MIN in the same results module that has City Locations applied as a dimension on columns—the Earliest Start Month for City time period-formatted for months result line item returns the earliest start month for an employee at each city location:

Pay Details.Start Month[MIN: Pay Details. City]        

Note that MIN does not return a value in the result for Los Angeles, York and Lyon—this is because there are no selections for these cities in the City source line item, that is formatted on the City Location list.

Back to Top

Similar functions