MIN

Syntax

MIN (X, Y)

MIN (arg1, arg2, . . . arg16)

Description

The MIN function returns the minimum of a series of values. It accepts up to 16 arguments.

Example

Given A = 4, B = 3, C = 2, D = 1.

MIN(A, B, C, D) returns D.

You can sometimes simplify formulas by using the MIN function instead of the IF function. For example, suppose that an analytic model contains data cubes called CASH_NEEDED, CREDIT_BALANCE, and MAX_CREDIT. You might be tempted to calculate the CREDIT_DRAW by using the following formula:

IF(CASH_NEEDED <= MAX_CREDIT - CREDIT_BALANCE, 
CASH_NEEDED, MAX_CREDIT - CREDIT_BALANCE)

In other words, if CASH_NEEDED is less than or equal to the available credit, draw the full CASH_NEEDED; otherwise, draw the available credit. Although the IF function does the job, the MIN function is simpler:

MIN(CASH_NEEDED, MAX_CREDIT - CREDIT_BALANCE)

If CASH_NEEDED is less than the available credit, the formula returns CASH_NEEDED; otherwise, the formula returns the available credit.

Related Topics