## How does the TRUNC function (DAX) 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 function?

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 Support Forum Posts

Two Tables – How to Subtract data
Waterfall Chart in Power BI
Customers Table

## Considerations when using the TRUNC function

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.

=TRUNC(PI())

=TRUNC(-8.9)

=TRUNC(PI(),2)

## Related Course Modules 