MOD Function (DAX)

How does the MOD function (DAX) work?

MOD function returns the remainder after a number is divided by a divisor. The result always has the same sign as the divisor.

MOD Formula Syntax

= MOD(
     <number>, <divisor>

How do you use the MOD function?

The MOD function can be expressed in terms of the INT function: MOD(n, d) = n – d*INT(n/d)

Related Blog Posts

Related Support Forum Posts

Understanding DAX Formula
Developing Complex Dax functions

Considerations when using the MOD function

If the divisor is 0 (zero), MOD returns an error. You cannot divide by 0.

Related Video Tutorials

Formula examples using the MOD function

Example 1

The following formula returns 1, the remainder of 3 divided by 2.

= MOD (

Example 2

The following formula returns -1, the remainder of 3 divided by 2. Note that the sign is always the same as the sign of the divisor.

= MOD (
    -3, -2


Related DAX Functions


Related Course Modules



Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.

Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide