OpenBI Docs Buy

Number.RoundDown

Rounds down to the whole number, or the step of a decimal place, at or below a number: toward minus infinity.

Group: Number. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Number.RoundDown(number as nullable number, optional digits as nullable number) as nullable number
ParameterTypeDescription
numbernullable numberThe number to work on; null gives null.
digitsnullable number
optional
How many decimal places to keep; 0, a whole number, when left out.

Returns

nullable number. The largest whole number (or number with that many decimals) that is not above the number; null for null.

Remarks

  • Negative numbers go away from zero: -12.5 rounds down to -13. To drop the fraction of a negative number instead, use Number.RoundTowardZero.
  • With digits, the number is taken as the decimal Power Query shows for it, so 0.29 rounded down to two places stays 0.29 even though its double is a hair below. Digits must be a whole number.

Examples

Full hours worked

Number.RoundDown(7.75)
7

Down to the cent

Number.RoundDown(19.987, 2)
19.98

A negative number

Number.RoundDown(-12.5)
-13

Number.RoundUp, Number.RoundTowardZero, Number.Round, Number.IntegerDivide.

Last updated · OpenBI Studio 0.3.79