Math

Clamp

Caps a number, or every number in a column, so nothing falls below a floor or rises above a ceiling. Values already inside the range pass through unchanged. Use it to apply payout caps or collars without writing conditional logic.

Inputs

InputAcceptsRequired
ValueAnyYes
MinValue (a single number)Yes
MaxValue (a single number)Yes

Outputs

OutputProduces
ResultAny

Settings

Typed in on the node or set by the assistant, not wired.

SettingDefaultNotes
Min0The floor. Any value below it is raised to this number. Default 0.
Max100The cap. Any value above it is lowered to this number. Default 100.

Example

Sales commissions are calculated as a percent of quota attainment, but the plan pays a minimum of $2,000 and caps at $25,000 per rep. Wire the raw commission column into Clamp with Min 2000 and Max 25000: a rep whose formula produced $1,350 is lifted to $2,000, a top performer at $31,800 is held at $25,000, and everyone in between keeps their exact figure.

Tips

Clamp changes the values; Filter removes rows instead. Use Clamp when every row should stay in the result but extreme values need to be reined in, for example to keep a chart's scale readable when one outlier would flatten everything else.

Related nodes