MIN() Function in Salesforce | Syntax, Examples, & Use Cases

The MIN() function in Salesforce returns the smallest of two or more numbers: MIN(Discount__c, 0.25) caps a discount at 25%. It only accepts numbers, so MIN(StartDate, CustomerSignedDate) fails, but you can still find the earliest of several dates with a simple workaround that I tested below.

In this tutorial, you’ll find the syntax, practical number examples, the tested date formulas (including how to skip blank dates), and when a roll-up summary or MAX() is the better tool. Everything was checked in a Salesforce Developer Edition org.

This Tutorial Covers: