Number.Mod is a Power Query M function that calculates the remainder resulting from the integer division of a number by a divisor. The function returns the remainder or null if either the number or divisor are null.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365


   number as nullable number,
   divisor as nullable number,
   optional precision as nullable number,
) as nullable number


Returns the remainder resulting from the integer division of number by divisor. If number or divisor are null, Number.Mod returns null.

  • number: The dividend.
  • divisor: The divisor.


Find the remainder when you divide 5 by 3.

// Output: 2
Number.Mod( 5, 3 )

Other functions related to Number.Mod are:

BI Gorilla Youtube Channel

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation:
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.