The MIN aggregation function returns the minimum value from a line item in a source module.

For example, you can use the MIN aggregation function to show the lowest salary level across different departments in an organization. 

Source[MIN: Mapping, MIN: Mapping 2, etc.]

ArgumentData typeDescription
SourceNumber, date, time period

The line item to search for the minimum value.

The minimum value for a number is the lowest value, and the minimum value for a date or time period is the earliest date or time period.

MappingList

The line item to use as search criteria.

If you want to provide multiple criteria, you can repeat this argument.

The MIN aggregation function returns a result of the same data type as the Line item argument.

If there are no values to aggregate:

  • In Polaris, MIN returns 0 for numbers, and BLANK for dates and time periods.
  • In the Classic Engine, MIN returns Infinity for numbers, 2399-12-31 for dates, and BLANK for time periods.
  • The list that's used to format the mapping line item in the source module, must be a dimension of the target line item that uses the MIN aggregation function.
  • The dimensions of the mapping line item must also appear in the source line item.
  • You can reference the Users list with the MIN function. However, you can't reference specific users in the Users list as this is production data, which can change and make your formula invalid.

In this example, the Salary Details module has line items on columns, and the Employees list on rows. The module shows employee salaries and city locations.

The Salary line item has a number data type. The City line item has a list data type, and is formatted on the City list. 


SalaryCity
Employee A35,000London
Employee B54,000New York
Employee C38,000San Francisco
Employee D24,000Edinburgh
Employee E60,000New York
Employee F40,000London

Below, the Minimum Salary Details module has the Minimum salary for city line item on rows, and the City list on columns. 

The formula uses the MIN aggregation function to show the lowest salary in each city.


LondonEdinburghSan FranciscoNew York

Minimum salary for city

Salary Details.Salary[MIN: Salary Details.City]

35,00024,00038,00054,000

Another example uses the Salary Details module as above, but includes an additional Department line item. Department has a list data type, and is formatted on the Department list.


SalaryDepartmentCity
Employee A35,000HRLondon
Employee B54,000FinanceNew York
Employee C38,000MarketingSan Francisco
Employee D27,500MarketingSan Francisco
Employee E24,000SalesEdinburgh
Employee F60,000FinanceNew York
Employee G40,000HRLondon

Below, the Minimum Salary Details module has the Minimum salary for city line item on pages, the Department list on rows, and the City list on columns. 

The formula in the line item uses the MIN aggregation function to show the lowest salary in different departments and cities: Salary Details.Salary[MIN: Salary Details.City, MIN: Salary Details.Department].

For example, the lowest salary in the Finance department in New York is 54,000.


LondonEdinburghSan FranciscoNew York
HR35,000


Finance


54,000
Sales
24,000

Marketing

27,500