Floor
floor
The floor function rounds a numeric value down to the nearest integer.
Spec
floor(arg0) Parameters
arg0 - The numeric value to round down. Return Value
The largest integer less than or equal to the input value. Example
datatable(val:real)[1.7, 2.3, -1.8]
| extend floored = floor(val) | val | floored |
|---|---|
| 1.7 | 1 |
| 2.3 | 2 |
| -1.8 | -2 |
floor
Rounds numbers down to the nearest integer or specified precision.
Syntax
floor(Number [, Precision]) Precisionis optional; when provided, rounds to that decimal place or power of 10.
Examples
Round to integer:
datatable(x:real)[1.9, 2.1]
| extend floored = floor(x) Round to tens:
datatable(x:int)[3, 17, 42]
| extend bucket = floor(x, 10)