DAX Math & Trigonometric - TRUNC function



Description

Truncates a number to an integer by removing the decimal part of the number.

Syntax

TRUNC (<number>) 

Parameters

Sr.No. Parameter & Description
1

number

The number you want to truncate.

Return Value

A whole number.

Remarks

DAX TRUNC and INT functions result in the same integer for positive numbers.

  • TRUNC removes the fractional part of the number.

  • INT rounds the number down to the nearest integer.

However, DAX TRUNC and INT functions might result in different integers for negative numbers.

  • TRUNC removes the fractional part of the number.

  • INT rounds the number down to the nearest integer based on the value of the fractional part of the number.

For example, TRUNC (-6.3) returns -6, but INT (-6.3) returns -7 because -7 is the nearest integer.

Example

= TRUNC (5.8) returns 5. 
= TRUNC (-5.8) returns -5. 
dax_functions_mathematical_trigonometric.htm
Advertisements