INT
A number rounded down to a whole number.
Group: Math. Compatible with DAX.
Syntax
INT ( <number> )
| Parameter | Type | Description |
|---|---|---|
number | Number | The number to take down to a whole number. |
Returns
Whole number. The largest whole number that is not above the number.
Remarks
- INT goes down, towards minus infinity:
INT ( -4.7 )is -5.TRUNCdrops the decimals, towards zero:TRUNC ( -4.7 )is -4. For positive numbers the two agree. - A blank gives BLANK. A Currency value stays a Currency value.
- On a date with a time it gives the day's number, the time dropped.
- To round to the nearest whole number rather than down, use
ROUND ( number, 0 )orCONVERT ( number, INTEGER ).
Examples
INT against TRUNC
They agree for 4.7 and part ways for -4.7.
EVALUATE
ROW (
"INT ( 4.7 )", INT ( 4.7 ),
"TRUNC ( 4.7 )", TRUNC ( 4.7 ),
"INT ( -4.7 )", INT ( -4.7 ),
"TRUNC ( -4.7 )", TRUNC ( -4.7 )
)
| INT ( 4.7 ) | TRUNC ( 4.7 ) | INT ( -4.7 ) | TRUNC ( -4.7 ) |
|---|---|---|---|
| 4 | 4 | -5 | -4 |
The day of a date and time
EVALUATE
ROW ( "Day number", INT ( DATE ( 2025, 3, 1 ) + TIME ( 18, 0, 0 ) ) )
| Day number |
|---|
| 45717 |