The MIN aggregation function returns the minimum value from a line item in a source module.
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.]
Argument | Data type | Description |
Source | Number, 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. |
Mapping | List | 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 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.
Salary | City | |
Employee A | 35,000 | London |
Employee B | 54,000 | New York |
Employee C | 38,000 | San Francisco |
Employee D | 24,000 | Edinburgh |
Employee E | 60,000 | New York |
Employee F | 40,000 | London |
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.
London | Edinburgh | San Francisco | New York | |
Minimum salary for city
| 35,000 | 24,000 | 38,000 | 54,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.
Salary | Department | City | |
Employee A | 35,000 | HR | London |
Employee B | 54,000 | Finance | New York |
Employee C | 38,000 | Marketing | San Francisco |
Employee D | 27,500 | Marketing | San Francisco |
Employee E | 24,000 | Sales | Edinburgh |
Employee F | 60,000 | Finance | New York |
Employee G | 40,000 | HR | London |
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.
London | Edinburgh | San Francisco | New York | |
HR | 35,000 | |||
Finance | 54,000 | |||
Sales | 24,000 | |||
Marketing | 27,500 |
Disclaimer
We update Anapedia content regularly to provide the most up-to-date instructions.