min_of()

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

Returns the minimum value of several evaluated scalar expressions.

Syntax

min_of (arg, arg_2, [ arg_3, ... ])

Learn more about syntax conventions.

Parameters

Name Type Required Description
arg, arg_2, ... scalar ✔️ A comma separated list of 2-64 scalar expressions to compare. The function returns the minimum value among these expressions.
  • All arguments must be of the same type.
  • Maximum of 64 arguments is supported.
  • Non-null values take precedence to null values.

Returns

The minimum value of all argument expressions.

Examples

Find the maximum value in an array:

print result=min_of(10, 1, -3, 17) 

Output

result
-3

Find the minimum value in a data-table. Non-null values take precedence over null values:

datatable (A: int, B: int)
[
    5, 2,
    10, 1,
    int(null), 3,
    1, int(null),
    int(null), int(null)
]
| project min_of(A, B)

Output

result
2
1
3
1
(null)