OpenBI Docs Buy

Double.From

A value as a double-precision floating-point number (Double.Type), the kind M uses for numbers by default.

Group: Values, types and errors. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Double.From(value as any, optional culture as nullable text) as nullable number
ParameterTypeDescription
valueanyThe value to convert: a number, text, a logical, a date, datetime, time or duration; null gives null.
culturenullable text
optional
The culture text is read in, such as "nb-NO"; the query's culture when left out.

Returns

nullable number. The number; null for null.

Remarks

  • Text is read as Number.From reads it, an exponent such as 1.5e3 included; a duration gives days.

Examples

An exponent

Double.From("1.5e3")
1500

A decimal comma

Double.From("1,5", "de-DE")
1.5

Twelve hours in days

Double.From(#duration(0, 12, 0, 0))
0.5

Single.From, Decimal.From, Number.From.

Last updated · OpenBI Studio 0.3.79