MicroStrategy ONE

Trunc (Truncate)

Returns the integer component of a given number. The function removes the fractional part of a real number so that only the integer part remains. The fractional part is removed without rounding the number up or down. This is a single-value function.

Syntax

Trunc(Argument)

Where:

Argument is a metric representing a list of real numbers.

Usage Notes

Results from Trunc and Int differ only when the values are less than 0.

Example

This simple example illustrates how the Trunc function acts on positive and negative numbers, and how it differs from the Int function.

Argument Values Int Trunc

947.67

947.00

947.00

463.33

463.00

463.00

-947.67

-948.00

-947.00

-463.33

-464.00

-463.00