Int64.From

The function Int64.From returns a 64-bit integer number value based on the input value provided. If the input value is null, then Int64.From will also return null. If the input value is a number withi...

Syntax

Int64.From(value as any, optional culture as nullable text, optional roundingMode as nullable number) as nullable number

About

The function Int64.From returns a 64-bit integer number value based on the input value provided. If the input value is null, then Int64.From will also return null. If the input value is a number within the range of 64-bit integer but includes a fractional part, the number will be rounded using the specified rounding mode. By default, the rounding mode is set to RoundingMode.ToEven. If the input value is of a different type, it will first be converted to a number using Number.FromText. Different rounding modes can be used by referring to Number.Round. Additionally, an optional culture can be specified, such as "en-US".

Explanation

Obtain the 64-bit integer value of "4" by using the Power Query MInt64.From function. The output will be 4. To get the 64-bit integer value of "4.5" with rounding mode set to AwayFromZero, use the Power Query MInt64.From function with the parameters ("4.5", null, RoundingMode.AwayFromZero). The output will be 5.