Double.From

Updated on

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

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

Syntax

Double.From(
   value as any,
   optional culture as nullable text,
) as nullable number
Argument Attribute Description
value
culture optional The culture argument enables the specification of a Culture code (e.g., “nl-NL” or “en-US”) to align transformations with local formatting conventions. If this argument is omitted, functions default to Culture.Current, which reflects the system’s regional settings.

Description

Returns a Double number value from the given value. If the given value is null, Double.From returns null. If the given value is number within the range of Double, 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 Double number value of "4".

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

Other functions related to Double.From are:

BI Gorilla Blog

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/double-from