How to Format Number Thousand Separator in Power Automate?

Do you need to format the numbers with thousand separators in Power Automate? Then, this Power Automate tutorial will help you format a number with a thousand separators in Power Automate flow.

Scenario:

I have a requirement where I need to format my number values with a thousand separators in a Power Automate flow.

For example, whenever the user inputs a value like 5230452, I want to format the input value as with a thousand separator value; once the value is formatted, the output of the value will be 5,230,452.

Before creating a flow, we must know what standard and custom formats are available to display a number with a thousand separators.

The Standard format ‘N’ (Number)supports the Format Number action and the format-number function in Power Automate and configures the number with decimal places.

FormatExpressionNumberOutput
NformatNumber(21354,’N’)2135421,354.00
N0formatNumber(21354,’N0’)2135421,354
N1formatNumber(21354,’N1’)2135421,354.0
N2formatNumber(21354,’N2’)2135421,354.00
N3formatNumber(21354,’N3’)2135421,354.000

We use the ‘, ‘Placeholder for the Custom format thousand separator.

Now, we will create a flow to format a number value with a thousand separator using Power Automate flow.

Format Number Thousand Separator in Power Automate

Let us see how to format numbers with thousand separators in Power Automate flow,

Example-1: (Using Format Number action)

Here, we will see how to format a number value with a thousand separator by using the Format Number action with two different formats in Power Automate flow.

  • Standard Format
  • Custom Format

Step-1:

Create an instant cloud flow, expand the trigger action, and add a Number input as below:

Power Automate format number thousand separator

Step-2: (Standard Format)

Add a new step and choose the Format Number action from the action trigger. Configure the required information.

  • Number – select the dynamic content of the number input
  • Format – choose the Standard format ‘N2’, which formats the input number value with thousand separators.
  • Locale – Is an option field (Used to format the number)
triggerBody()['number']
format number thousand separator in Power Automate

Step-3:

See also  Auto Populate SharePoint List Columns Based on Value in One Column using Power Automate

Save and Run the flow. Enter the number input and choose the run flow option.

Formatting number with thousands separator in Power Automate flow

Once the flow runs successfully, we can see that the number value is formatted with a thousand separator and configured decimal value.

Here, I have given the input value as 5230452 and selected the standard format for thousand separators as N2, so it displays the output value as 5,230,452.00

Formatting number with thousands separator in Flow

Similarly, in the Format action (step-2), if we enter the Standard format as N0, it configures the value without decimal configuration.

triggerBody()['number']
format number function in power automate custom format

Save and Run the flow. Enter the number input and choose the run flow option.

format number function custom format in Power Automate

Once the flow runs successfully, it displays the formatted number value with the thousand separators as 1,453,365 without decimal configuration.

format number function in power automate flow

Step-4: (Custom Format)

Custom Format – Thousand separator Placeholder uses #,# format,

Follow the (step-2) in the format number action, in the format option, choose the Enter Custom value and pass the format value as #,# as shown below:

triggerBody()['number']
format number thousand separator in Power Automate flow

Save and Run the flow; I have entered the input value as 7854625.

Number Formatting in Power Automate

Once the flow runs successfully, we can see it displays the formatted number value with the thousand separator as 7,854,625

Number Formatting in Power Automate flow

This is how to format a number value with a thousand separator by using the Format Number action with two different formats in Power Automate flow.

Example-2: (Using Format Number Function)

Now, we will see how to format a number value with a thousand separator by using the Format Number function with two different formats in Power Automate flow.

  • Standard Format
  • Custom Format

Step-1:

Create an instant cloud flow, expand the trigger action, and add a Number input as below:

Power Automate format number thousand separator

Step-2:(Standard Format)

Add a compose data operation, and under the Expression tab, pass the below expression to format a number value with a thousand separators.

formatNumber(triggerBody()['number'],'N3')

Where,

  • formatNumber – function name
  • number – input value
  • N3 – Standard Number format for thousand separator
Format number with thousands separator in Power Automate flow

Step-3:

See also  How to Convert String to Date for SharePoint list using Power Automate?

Save the flow. Enter the number input value and choose the run flow option.

Formatting number with thousands separator in Power Automate

Once the flow runs successfully, we can see that the number value is formatted with the thousand separators in the expected output section.

Here, I have given the input value as 56789216 and selected the format as N3, so it displays the formatted thousand separator value as 56,789,216.000

How to format number with thousand separator in Power Automate

Step-4: (Custom Format)

Custom Format – Thousand separator Placeholder uses #,# format,

Follow the (step-2) and pass the below expression that uses the Custom value for the thousand separator in compose data operation.

formatNumber(triggerBody()['number'],'#,#')

Where,

  • formatNumber – function name
  • number – input value
  • #,# – Custom format for thousand separator
Format number with thousands separator in Flow

Here, I have given the input value as 34582645.

How to format number with thousand separator in Power Automate flow

Once the flow runs successfully, we can see it displays the output value as 34,582,645

How to format number with thousand separator in flow

This is how to format a number value with a thousand separator by using the Format Number function with two different formats in Power Automate flow.

Example-3: (Update SharePoint list field with Formatted thousand separator Value)

Let us see how we can update the SharePoint list field with formatted thousand separator values using Power Automate flow.

In this example, I am going to use the below SharePoint Products list, consisting of,

Column NameColumn Type
ProductNamedefault title column
ProductQuantityNumber column
ProductPriceNumber column
ProductStatusChoice column
ProductPriceValuewithThousandsSeparatorNumber column
Format Number Thousand Separator in Microsoft Power Automate

Step-1:

Create an automated cloud flow, and choose the trigger When an item is created or modified action from action triggers. Provide the required Parameters as highlighted below:

  • Site Address – From the dropdown, select the SharePoint site address
  • List – Choose the list name from the dropdown. (Here, I have selected my SharePoint Products List)
Format number thousands separators in Power Automate

Step-2:

Add a compose data operation, and pass the below expression to format a product price value with a thousand separator.

formatNumber(triggerOutputs()?['body/ProductPrice'],'N0')

Where,

  • formatNumber – function name
  • ProductPrice – column internal name
  • N0 – Standard Thousands separator format
Format number thousands separators in Power Automate flow

Step-3:

See also  The resource has changed since the caller last read it usually an etag mismatch in Power Automate

Select an Update item action from the action triggers and provide the required parameters:

  • Site Address – select the SharePoint site address from the dropdown
  • List – choose the list name from the dropdown.
  • ID– Select the ID from the dynamic content value
  • Title – From the dynamic content, choose the title value
  • ProductPriceValuewithThousandsSeparator – Pass the output of the compose data operation from dynamic content.
Format number thousands separators using Power Automate flow

Step-4:

Save the flow. The flow will trigger only when the new item is added or modified to the SharePoint list.

Here, I have added the new item with the Product Price value of 1424808, as shown below:

Format number thousands separators using Flow

Once the flow runs successfully, We can see that the product price value is formatted with the product price thousand separators and updates the values in the SharePoint list ProductPriceValuewithThousandsSeparator column as $1,424,808.

Format number thousands separators using Power Automate

This is how to update the SharePoint list field with formatted thousand separator values using Power Automate flow.

Conclusion

So, I hope you know how to format numbers with a thousand separators in Power Automate flow.

In the first example, I have explained format numbers with thousand separators with Standard Format and Custom Format using Format Number Action in Power Automate.

In the second example, I have explained format numbers with thousand separators in Standard Format and Custom Format using the Format Number function in Power Automate.

In the other example, I have shown you how to Update the SharePoint list field with Formatted Thousand separator values using Power Automate flow.

You may like the following:

>