DAX function
ROUNDUP / ROUNDDOWN — DAX function reference
Round away from / toward zero.
Syntax
dax
ROUNDUP(<number>, <num_digits>) ROUNDDOWN(<number>, <num_digits>)
Examples
dax
ROUNDUP([Sales], 0)
→ A number
dax
ROUNDUP(DIVIDE(COUNTROWS(Sales), 50), 0)
→ Number of pages needed at 50 rows per page, always rounding up
dax
ROUNDDOWN([Discount %] * 100, 0) / 100
→ Truncates a discount percentage to a whole percent, never rounding up
Common mistakes & gotchas
- ROUNDUP always moves away from zero and ROUNDDOWN always moves toward zero, regardless of sign — ROUNDDOWN(-4.7, 0) is -4, not -5, which is easy to get backwards with negative numbers.
- Neither performs "normal" rounding to the nearest value — using ROUNDUP/ROUNDDOWN where ROUND was intended is a common off-by-a-cent bug in financial measures.
Related DAX functions
From Math & statistics