Computes the minimum value of a field, array or range.
You can also specify which records of the field should be included.
Minimum( fld ) Minimum( fld, condFld ) Minimum( fld, condFld, cond ) Minimum( array or range )
| fld | The name of a field whose values should be used to calculate the minimum value. |
|---|---|
| condFld | The name of the field that groups the values of fld (if fld isn't an array). |
| cond | A string declaring the type of grouping to be used on condFld. This only makes sense for groups based on Date, DateTime, Time, and Boolean fields. See Summary Field Conditions for a list of strings you can use here. |
| array or range | The name of an array or range variable whose elements should be used to calculate the minimum value. |
Fractional numeric minimum value of the field or array
//returns the minimum value of the array minimum([2,5,3,2,9,6,4,3,2,5,7,8,5,1,3,6,4]) //returns 1
//returns the minimum value of the database field
minimum({Sales.Sales_Amount})
//returns the minimum Sales_Amount grouped by Vendors
minimum({Sales.Sales_Amount, Vendors.Vendor})
//a formula that depends on the minimum value of Sales_Amount
numberVar min = minimum({Sales.Sales_Amount});
if {Sales.Sales_Amount} > min * 4 then
red;
if {Sales.Sales_Amount} > min * 3 then
blue;
if {Sales.Sales_Amount} > min * 2 then
black;