Min()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

Min()

Syntax

Min( <NumericValue1>, <NumericValue2> )

Min( <DateValue1>, <DateValue2> )

 

Purpose

To return the smaller of two values.

 

Parameters

This function will determine the smaller of two values. These values may be of either numeric, or date type. This function will only work with one type of value at a time. You can not give it a date and numeric value together to compare.

 

Returns

This function will return either a numeric, or a date value depending on what it is given to compare. If this function is asked to compare two numeric values, it will return the smaller of the two numeric values. If asked to compare two date values, it will return the smaller of the two date values.

 

Usage

The Min() is useful when you wish to determine the smaller of two numeric or date values. For example, say you want to print a report with a column you just invented which contains the lesser of the two previous years of giving. To do this you would enter:

 

Min( .Donation_Total_For_Calandar_Year_1_Year_Ago., .Donation_Total_For_Calandar_Year_2_Years_Ago. )

 

...for the report column's Field Name/Expression.