← Al Davies, 250 High Street

How to format a number as currency in Power Automate

Use the formatNumber() expression with the C2 format. For example, formatNumber(17.35, 'C2') returns the text "$17.35". For commas and two decimals without a symbol, use '#,##0.00'.

What does formatNumber() do?

The formatNumber() function turns a number into text in the format you choose. Microsoft documents it as formatNumber(number, format, locale?). The number and the format are required. The locale is optional.

If you leave out the locale, the function uses en-us. If you give a locale that is not valid, the action returns an error. The result is a string, so you can drop it into an email, a Teams message or an HTML table.

How do you format a number as currency?

Microsoft shows this example: formatNumber(17.35, 'C2') returns "$17.35".

  1. Add a Compose action below the step that holds the number.
  2. Select the input box and open its Expression tab.
  3. Type formatNumber(triggerBody()?['Amount'], 'C2'), with your own value in place of the trigger output.
  4. Select Add, then save and run the flow.
  5. Check the run history. The output shows the amount with a currency symbol and two decimals.

How do you add commas and two decimals without a symbol?

Use a custom format. Microsoft shows formatNumber(1234567890, '#,##0.00', 'en-US'), which returns "1,234,567,890.00".

This is useful when the currency is already named in the sentence, such as "Total due in USD: 1,250.00".

How do you change the currency symbol or separators?

Pass a locale as the third argument. Microsoft shows formatNumber(17.35, 'C2', 'is-IS'), which returns "17,35 kr". The same page shows formatNumber(1234567890, '#,##0.00', 'is-IS') returning "1.234.567.890,00".

The locale sets the symbol and the separators. It does not convert money between currencies. A value of 17.35 stays 17.35.

What formats can you use?

The format argument accepts the standard numeric format strings of .NET, because the function relies on number.ToString(format, locale). C formats currency, N formats a number with group separators, and P formats a percent. A digit after the letter sets the decimal places.

Test each format with your own data. Look at the Compose output in run history before you use it in a message to customers.

Why does the formatted number fail in later steps?

The result is text. A later action that needs a number, such as a Condition that compares amounts, can fail or compare in the wrong order. Do the math first on the raw number. Format it last, in the step that builds the message.

Microsoft notes that you can cast the return value back to an int or float. A currency symbol or a comma can still make that cast fail, so keep the original number in the flow.

If the source column is empty, see the invalid type, expected string but got null error.

Where do you use the formatted text?

Common places are the body of an approval email, a Teams post and a table. For a table, see how to format an HTML table in Power Automate. For dates in the same message, see formatDateTime with the right time zone.

If you only need the formatted amount inside a SharePoint list, a column setting is often enough. See SharePoint calculated column formulas.

FAQ

Is there a Format Currency action in Power Automate?

No. Use the formatNumber() expression in a Compose, Send email or Post message input.

Does formatNumber() round the number?

The format string sets the decimal places shown. If the exact rounding rule matters, test it with your own values in run history.

Can I format a number from a SharePoint Currency column?

Yes. Pass the column value as the first argument. The column format in SharePoint does not carry into the flow, so apply formatNumber() in the flow.

What locale code do I use for the UK?

Use en-GB as the third argument. Check the symbol in run history before you send the message.

Sources