Decimal.From

Decimal.From is a Power Query M function that converts a given value to a Decimal number. The function returns a Decimal number value or null if the input value is null.

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

Syntax

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

Description

Returns a Decimal number value from the given value. If the given value is null, Decimal.From returns null. If the given value is number within the range of Decimal, value is returned, otherwise an error is returned. If value is of any other type, it will first be converted to a number using Number.FromText. An optional culture may also be provided (for example, “en-US”).

Examples

Get the Decimal number value of "4.5".

// Output: 4.5
Decimal.From( "4.5" )

Other functions related to Decimal.From are:

BI Gorilla Youtube Channel

Last update: August 25, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/decimal-from
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.