MinIf
The MinIf function finds the minimum value for a column or group if the conditions are true.
The MinIf function is an aggregate function.
Aggregate functions evaluate one or more rows of data and return a single value.
In a table element, the aggregate is calculated for each grouping. For information on how to add a grouping with an aggregate calculation to a table, see Group columns in a table.
In a table with no groupings, the aggregate is calculated for each row. For information on how to calculate summary statistics across all rows in a table, see Add summary statistics to a table.
To learn more about using aggregate functions, see Building complex formulas with grouped data.
Syntax
MinIf(field, condition)
Function arguments:
- field (required) - The column to be searched. Can be of type Number, Date, and String.
- condition (required) - The condition to test. If the condition is True, then the row will be factored into the aggregate. You can use operators in conditions.
The minimum of strings is determined by sort order, which is affected by your database settings. Sort order is most often blank spaces > special characters > numbers > uppercase letters > lowercase letters.
For numbers, preceding and trailing zeroes most often have no effect on sort order.
Examples
MinIf([Invoice Date], [State] = "TX")
- Finds the earliest Invoice Date of all entries where the State indicated is Texas.
MinIf([Sales], [Region] = "East" AND [Status] = "Complete")
- Finds the minimum Sale value for entries in the "East" Region that are marked as "Complete".
Updated about 5 hours ago
