Number.FromText

Number.FromText is a Power Query M function that creates a number value from a given text representation, with support for common text formats and an optional culture parameter. The function returns the created number value.

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

Syntax

Number.FromText(
   text as nullable text,
   optional culture as nullable text,
) as nullable number

Description

Returns a number value from the given text value, text.

  • text: The textual representation of a number value. The representation must be in a common number format, such as “15”, “3,423.10”, or “5.0E-10”.
  • culture: An optional culture that controls how text is interpreted (for example, “en-US”).

Examples

Get the number value of "4".

// Output: 4
Number.FromText( "4" )

Get the number value of "5.0e-10".

// Output: 5E-10
Number.FromText( "5.0e-10" )

Other functions related to Number.FromText are:

BI Gorilla Blog

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