Downloads
Power Query MNumberIntermediate

Number.ToText

Formats a number as text, using a format string such as a fixed number of decimal places or a currency style.

Syntax
Number.ToText(number as nullable number, optional format as nullable text, optional culture as nullable text) as nullable text

Returns: The formatted text, or null when the input is null.

What it does

Number.ToText turns a number into formatted text for display, such as a label on a chart, a line in an email, or a column that must show two decimals with thousands separators. The format string sets the look, and the culture sets the separators and the currency symbol. Formatting changes the look of the value only, so keep the number for any calculation.

Syntax and arguments

Example

A board pack shows revenue in a text box with thousands separators, and the same figure is also written as a currency for an email to the owner.

let
    Revenue = 1234.5,
    Display = Number.ToText(Revenue, "N2", "en-US"),
    AsCurrency = Number.ToText(Revenue, "C2", "en-US"),
    German = Number.ToText(Revenue, "N2", "de-DE")
in
    {Display, AsCurrency, German}

Display is "1,234.50" and AsCurrency is "$1,234.50" for the US culture. The German culture uses a decimal comma and a point for thousands, so the same number is written differently.

Example: a second, different use

Build the label for a chart axis that shows amounts in thousands with no decimals, using a format such as "N0".

Things to watch

In business terms

Management reports, board packs and customer letters need amounts shown in a consistent, readable way. Formatting in the query keeps the text consistent, while the number stays available for totals and checks.

Related functions

All Power Query M functions · View as Markdown · M basics