TRUNC Function (DAX)

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 Blog Posts

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.

Related Video Tutorials

Formula examples using the TRUNC function

=TRUNC(PI())

=TRUNC(-8.9)

=TRUNC(PI(),2)

Related DAX Functions

ROUND
MROUND
ROUNDUP
INT
ROUNDDOWN

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI
Center of Excellence

DOWNLOAD


Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.


Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide
Membership