Double.From
NumberConverts a value to a double-precision floating-point number (64-bit IEEE 754).
Syntax
Double.From(value as any, optional culture as nullable text) as nullable numberParameters
| Name | Type | Required | Description |
|---|---|---|---|
value | any | Yes | The value to convert. Accepts number, text, logical, or null. |
culture | text | No | An optional culture string for locale-aware parsing of text values. |
Return Value
number — A double-precision (64-bit) floating-point number.
Remarks
Double.From converts a value to a 64-bit IEEE 754 double-precision floating-point number. This is the default numeric type in Power Query M — every numeric literal like 3.14 or 1000 is a double unless a more specific type is applied. Double-precision provides approximately 15–17 significant decimal digits and can represent values up to approximately ±1.8 × 10^308.
In practice, Double.From is functionally identical to Number.From. The distinction matters primarily when you need to explicitly annotate a column or variable as double-precision — for example, when building a typed table schema for a custom connector, or when documenting that a column uses 64-bit floating-point rather than the fixed-point Decimal or Currency types.
A key limitation of double-precision arithmetic is that it cannot represent all decimal fractions exactly. Values like 0.1 and 0.2 are stored as approximations, which means repeated arithmetic can accumulate small errors. For financial or monetary data where exactness matters, use Decimal.From or Currency.From instead. Text values are parsed using the specified culture — pass "de-DE" for German-formatted numbers with a comma decimal separator. Logical true converts to 1.0, false to 0.0, and null returns null.
Examples
Example 1: Parse a decimal text string
Double.From("3.14159")Result | |
|---|---|
| 1 | 3.14 |
Example 2: Parse a German-formatted number with culture
Double.From("1.234,56", "de-DE")Result | |
|---|---|
| 1 | 1,234.56 |
Example 3: Convert a logical value to double
#table(
{"Input", "AsDouble"},
{
{true, Double.From(true)},
{false, Double.From(false)}
}
)Input | AsDouble | |
|---|---|---|
| 1 | TRUE | 1 |
| 2 | FALSE | 0 |