Number.IntegerDivide
How many whole times one number goes into another, the fraction cut off.
Group: Number. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Number.IntegerDivide(number1 as nullable number, number2 as nullable number, optional precision as nullable number) as nullable number
| Parameter | Type | Description |
|---|---|---|
number1 | nullable number | The number to divide. |
number2 | nullable number | The number to divide by. |
precision | nullable number optional | Precision.Double (the default) or Precision.Decimal. |
Returns
nullable number. The quotient without its fraction, cut toward zero; null when either number is null.
Remarks
- With a negative quotient the fraction is cut toward zero: -7 divided by 2 gives -3.
Number.Modgives what is left over.
Examples
Full boxes of 12 from 125 items
Number.IntegerDivide(125, 12)
10
A negative number
Number.IntegerDivide(-7, 2)
-3