Power Query Number to Text: Step-by-Step Guide
In this article
To convert a number to text in Power Query, use the Number.ToText function (or the Text.From function) inside a custom column or by changing the column type to Text. The quickest route is to select the column, go to the Transform tab, and choose Data Type > Text — but that only works cleanly if you also control formatting such as decimals and thousands separators. For precise control, add a custom column with a formula like Number.ToText([Amount], "0.00"). This guide walks through both methods, plus the formatting codes and pitfalls you need to know.
What You'll Need
- Power BI Desktop, Excel (Power Query Editor), or Analysis Services with Power Query — the steps below use the Power Query Editor interface, which is nearly identical across these hosts.
- A query already loaded with at least one numeric column.
- Basic familiarity with adding a custom column (Add Column > Custom Column).
Step-by-Step
- Open the Power Query Editor. In Excel, go to Data > Get Data > Launch Power Query Editor (or edit an existing query). In Power BI Desktop, click Transform Data on the Home ribbon. Menu labels can differ slightly by version, host application, or region.
- Select the numeric column you want to convert. Its data type icon (usually a 1.2 or similar) appears to the left of the column header.
- Option A — quick type change: On the Home or Transform tab, open the Data Type dropdown and choose Text. Power Query converts the values using the query's current locale. This is fine for whole numbers but may drop trailing zeros or use a locale-specific decimal separator.
- Option B — precise formatting with a custom column: Go to Add Column > Custom Column. Name the column (for example, AmountText).
- Enter the formula. Use
Number.ToText([Amount])for a plain conversion, or add a format string:Number.ToText([Amount], "0.00")forces two decimal places;Number.ToText([Amount], "N2")uses the culture's number format with two decimals;Number.ToText([Amount], "C2", "en-US")produces a currency-style string with two decimals for the specified culture. The format string and optional culture arguments are documented in the Power Query M function reference. - Click OK. The new column appears at the right of the table with a text (ABC) icon.
- Check the result. Scroll through the column and confirm decimal separators, thousands separators, and leading zeros look the way you expect. If not, edit the custom column step in the Applied Steps pane and adjust the format string or culture argument.
- Remove the original numeric column if you no longer need it (right-click the column header > Remove), then close and load the query with Home > Close & Load (Excel) or Close & Apply (Power BI).
Common Mistakes
- Relying on the Data Type dropdown for formatted output. Changing the type to Text converts the underlying value but does not let you specify decimal places, thousands separators, or currency symbols. Use
Number.ToTextwith a format string instead. - Forgetting the culture argument. If your query runs under a different locale than your audience, decimal and thousands separators can flip (1,234.56 vs 1.234,56). Supply a culture such as "en-US" or "de-DE" explicitly when the output must be consistent.
- Losing leading zeros. A number like 007 becomes 7 before conversion. If leading zeros matter (product codes, zip codes), the source column should already be text, or you must pad the result with
Text.PadStart. - Assuming a format string works for every value. Nulls convert to null, and very large or very small numbers may render in scientific notation depending on the format string. Test edge cases.
- Changing a column type in place when downstream steps depend on it. Adding a new text column and removing the old one is safer than retyping the original column, because later steps may reference the numeric type.
Tips
- Use
Text.From([Amount])as a simpler alternative when you do not need a format string — it converts the value to text using the current culture. - Combine conversion with concatenation in one custom column, e.g.
"Total: " & Number.ToText([Amount], "0.00"). - Keep the original numeric column until you have verified the text output; you can always remove it later.
- Use the Applied Steps pane to edit a custom column step rather than deleting and recreating it — the formula bar shows the exact M code.
- For dates and other types, the same pattern applies with
Date.ToText,DateTime.ToText, etc.
Troubleshooting
If the conversion produces an error: check for nulls or non-numeric values in the source column. A single text value in a numeric column will cause the type change to fail. Filter or replace errors before converting.
If decimals or separators look wrong: add an explicit culture argument to Number.ToText and re-check the format string. Format strings are case-sensitive in some contexts; "n2" and "N2" may behave differently depending on the function.
If the new column shows the ABC icon but values still look numeric: that is expected — the values are stored as text. If a downstream tool re-parses them as numbers, the formatting may be lost; keep the text column as the final output.
If the query is slow after adding the column: custom columns are computed row by row. For very large tables, consider doing the conversion in the source system or using a simpler type change where formatting is not required.
If the step is missing after reopening: ensure you saved the query and that the custom column step is not folded into a later step that removes it. Check the Applied Steps pane.
Frequently Asked Questions
What is the difference between Number.ToText and Text.From?
Number.ToText accepts a format string and an optional culture, giving you control over decimals, separators, and currency style. Text.From is a generic conversion using the current culture with no formatting options.
Can I convert a number to text with a thousands separator?
Yes. Use a format string such as "N0" or "#,##0" with Number.ToText, optionally specifying a culture.
Why did my leading zeros disappear?
Power Query stores the value as a number, and numbers do not retain leading zeros. Convert the source column to text before any numeric transformation, or pad the result with Text.PadStart.
Does changing the data type to Text round the number?
No. It converts the stored value to its text representation using the query's locale. Rounding only occurs if you apply a rounding function or a format string that specifies fewer decimals.
Can I use a custom format like currency symbols?
Yes, with a format string such as "C2" and a culture argument. The exact symbol depends on the culture you specify.
Will this work the same in Excel and Power BI?
The Power Query engine and M functions are the same, so the formulas behave identically. The surrounding menus and ribbon labels can differ slightly between hosts and versions.