Power Query
published
Search
⌃K

Number.ToText

Number.ToText

Formats the given number as text.
function (optional number as nullable any, optional format as nullable any, optional culture as nullable any) as nullable any

Description

Formats the numeric value number to a text value according to the format specified by format. The format is a single character code optionally followed by a number precision specifier. The following character codes may be used for format.

Category

Number.Conversion and formatting

Examples

Format a number as text without format specified.
Number.ToText(4)
"4"
Format a number as text in Exponential format.
Number.ToText(4, "e")
"4.000000e+000"
Format a number as text in Decimal format with limited precision.
Number.ToText(-0.1234, "P1")
"-12.3 %"