Single.From

Updated on

Single.From is a Power Query M function that returns a Single number value from the given value. The function returns a Single number value or an error if the value is out of range.

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

Syntax

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

// Output: 1.5
Single.From( "1.5" )

Other functions related to Single.From are:

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