- DAX Functions Tutorial
- DAX Functions - Home
- DAX Functions - Introduction
- DAX Parameter Naming Conventions
- Description Structure
- DAX Functions - Aggregation
- DAX Functions - Filter
- DAX Functions - Time Intelligence
- DAX Functions - Date and Time
- DAX Functions - Information
- DAX Functions - Logical
- Math & Trigonometric Functions
- DAX Functions - Parent & Child
- DAX Functions - Statistical
- DAX Functions - Text
- DAX Functions - Other
- DAX Functions Useful Resources
- DAX Functions - Quick Guide
- DAX Functions - Useful Resources
- DAX Functions - Discussion
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