min_of function in APL to determine the minimum value among two or more scalar values. The function returns the smallest of its arguments, making it especially useful when you want to compare metrics, constants, or calculated expressions in queries.
You typically use min_of when you want to:
- Compare numeric or time-based values across multiple fields or constants.
- Apply conditional logic in summarization or filtering steps.
- Normalize or bound values when computing metrics.
min(), which work across rows in a group, min_of operates on values within a single row or context.
For users of other query languages
If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.Splunk SPL users
Splunk SPL users
In Splunk, you often use the
eval command with the min function to compare multiple values. APL’s min_of is similar, but used as a scalar function directly in expressions.ANSI SQL users
ANSI SQL users
In SQL, you typically use
LEAST() to find the smallest of multiple values. APL’s min_of is the equivalent of LEAST().