Int16.From is a Power Query M function that converts a given value to a 16-bit integer, applying rounding if necessary. The function returns either a 16-bit integer or null if the given value is null.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365


   value as any,
   optional culture as nullable text,
   optional roundingMode as nullable number,
) as nullable number


Returns a 16-bit integer number value from the given value. If the given value is null, Int16.From returns null. If the given value is number within the range of 16-bit integer without a fractional part, value is returned. If it has fractional part, then the number is rounded with the rounding mode specified. The default rounding mode is RoundingMode.ToEven. If value is of any other type, it will first be converted to a number using Number.FromText. Refer to Number.Round for the available rounding modes. An optional culture may also be provided (for example, “en-US”).


Get the 16-bit integer number value of "4".

// Output: 4
Int64.From( "4" )

Get the 16-bit integer number value of "4.5" using RoundingMode.AwayFromZero.

// Output: 5
Int16.From( "4.5", null, RoundingMode.AwayFromZero )

Other functions related to Int16.From are:

BI Gorilla Blog

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation:
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.