DAX Function Guide

TRUNC
Empty image or helper icon

Sam McKay

CEO & Founder

How does the TRUNC work?
The TRUNC function (DAX) removes the fractional part of a number and, thus, truncates a number to an integer.
TRUNC Formula Syntax

TRUNC (
     <number>,<num_digits>
)

How do you use the TRUNC?

Use the TRUNC function to remove the fractional part of a number and return just the integer. For example, TRUNC(4.9) will return 4, and TRUNC(-3.5) will return -3. TRUNC does not do any rounding, it simply returns the integer part of the number.

Related Blog Posts

Loading

Considerations when using the TRUNC?

The TRUNC and INT are similar in that both return integers. TRUNC removes the fractional part of the number. INT rounds numbers down to the nearest integer based on the value of the fractional part of the number. INT and TRUNC are different only when using negative numbers: TRUNC(-4.3) returns -4, but INT(-4.3) returns -5 because -5 is the lower number.

Related Video Tutorials

Loading

Formula examples using the TRUNC

=TRUNC(PI())

=TRUNC(-8.9)

=TRUNC(PI(),2)

Related Courses

Loading