Cheat Sheets/Power BI/MOD
DAX function

MODDAX function reference

Remainder after division.

Syntax

dax
MOD(<number>, <divisor>)

Examples

dax
MOD([Row], 2)
A number
dax
MOD('Date'[WeekOfYear] - 1, 4) + 1
Groups ISO weeks into 4-week 'periods', a common retail fiscal-calendar pattern
dax
IF(MOD(Sales[InvoiceNumber], 2) = 0, "Even batch", "Odd batch")
Splits records into two groups by invoice number parity, e.g. for sampling

Common mistakes & gotchas

Related DAX functions

From Math & statistics

← Back to the Power BI (DAX) cheat sheet