Cheat Sheets/Power Automate/min / max
Power Automate (WDL) function

min / maxPower Automate (WDL) function reference

Smallest or largest argument.

Syntax

wdl
min(collection|value1, [value2, ...]) / max(collection|value1, [value2, ...])

Examples

wdl
max(variables('a'), variables('b'))
A number
wdl
max(createArray(item()?['Score1'], item()?['Score2'], item()?['Score3']))
The highest of the three scores
wdl
min(variables('requestedQty'), variables('availableStock'))
The smaller of the two, capping a request at the ceiling

Common mistakes & gotchas

Related Workflow Definition Language functions

From Math

Used in these tutorials

← Back to the Power Automate (WDL) cheat sheet