OpenBI Docs Buy

INT

A number rounded down to a whole number.

Group: Math. Compatible with DAX.

Syntax

INT ( <number> )
ParameterTypeDescription
numberNumberThe 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. TRUNC drops 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 ) or CONVERT ( 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 )
44-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

TRUNC, ROUNDDOWN, FLOOR, CONVERT, QUOTIENT.

Last updated · OpenBI Studio 0.3.74