DAX Function Guide
MOD
Sam McKay
CEO & Founder
How does the MOD work?
MOD Formula Syntax
= MOD(
<number>, <divisor>
)
How do you use the MOD?
The MOD function can be expressed in terms of the INT function: MOD(n, d) = n – d*INT(n/d)
Related Blog Posts
Loading
Considerations when using the MOD?
If the divisor is 0 (zero), MOD returns an error. You cannot divide by 0.
Related Video Tutorials
Loading
Formula examples using the MOD
Example 1
The following formula returns 1, the remainder of 3 divided by 2.
= MOD (
3,2
)
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 Courses
Loading