Are you struggling to Format Number as Currency in Power Automate? Then, this Power Automate tutorial will help you format numbers as currency in Power Automate flow with different examples.
Scenario:
Recently, I got a requirement to format numbers as currency using Power Automate flow. For example, When the user inputs the value 23, and I want to format the input value as a currency value, once the value is formatted the output of the value will be $23.
Here, I will show three examples of formatting numbers as currency in Power Automate flow.
In the first example, I will show you how to format numbers as currency using the Format Number action with the Standard Format.
In the second example, I will show the formatting numbers as currency using the Format Number action with the Custom Format.
In the other example, I will show you how to get the Product Price value from the SharePoint list ProductPrice field. Then, format it as currency value, and update the formatted currency value in the SharePoint list ProductPriceinCurrency field.
Before creating a flow, we must know the Standard Format ‘C’ (Currency) to format the number value as a currency value.
Format | Expression | Number | Result |
C | formatNumber(10,’C’) | 10 | $10.00 |
C0 | formatNumber(10,’C0’) | 10 | $10 |
C1 | formatNumber(10,’C1’) | 10 | $10.0 |
C2 | formatNumber(10,’C2’) | 10 | $10.00 |
C3 | formatNumber(10,’C3’) | 10 | $10.000 |
Now, we will create a flow to format a number value as currency value using Power Automate flow.
How to Format Number as Currency in Power Automate
Let us see how to format numbers as currency using Power Automate flow.
Example-1: (Using Format Number action)
Here, we will see how to format a number value as a currency value by using the Format Number action in Power Automate flow.
By default, the currency format is ‘C’ which is ($10.00).
1. Create an instant cloud flow, expand the trigger action, and add a Number input as below:
2. Add a new step and choose the Format Number action from the action trigger. Pass the required parameters.
- Number – Pass the dynamic content of the number input
- Format – From the dropdown, choose the currency format value.
- Locale – a locale that is used to format the number (optional field)
triggerBody()['number']
3. Save and Run the flow. Enter the number input and choose the run flow option.
Once the flow runs successfully, we can see that the number value is formatted as a currency value in the expected output section.
Here, I have given the input value as 20 and selected the currency format ($1234.00) from the dropdown, which is currency format C, so it displays the output value as $20.00
This is how to format a number value as a currency value using the Format Number action in Power Automate flow.
Example-2: (Using Format Number function)
Now, we will see how to format a number value as currency value by using the Format Number function in Power Automate flow.
1. Create an instant cloud flow, expand the trigger action, and add a Number input as below:
2. Add a compose data operation and pass the below expression to format a number value as a currency value under the Expression tab.
formatNumber(triggerBody()['number'], 'C1')
Where,
- formatNumber – function name
- number – input value
- C1 – Standard Currency format
3. Save the flow. Enter the number input and choose the run flow option.
Once the flow runs successfully, we can see that the number value is formatted as a currency value in the expected output section.
Here, I have given the input value as 100 and selected the currency format (C1), so it displays the output value as $100.0
This is how to format a number value as currency value by using the Format Number function in Power Automate flow.
Example-3: (Update SharePoint list field with Formatted Currency Value)
Let us see how we can update the SharePoint list field with formatted currency value using Power Automate flow.
In this example, I am going to use the below SharePoint Products list, consisting of,
Column Name | Column Type |
ProductName | Default title column |
ProductPrice | Number column |
ProductStatus | Choice column |
ProductPriceinCurrency | Text column |
To achieve this, follow the below steps:
1. Create an automated cloud flow, and choose the trigger When an item is created or modified action from action triggers. Configure 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)
2. Add a compose data operation, and pass the below expression to format a number ProductPrice value as a ProductPriceinCurrency value under the Expression tab.
formatNumber(triggerOutputs()?['body/ProductPrice'],'C2')
Where,
- formatNumber – function name
- ProductPriceinCurrency – SharePoint column internal name
- C2 – Standard Currency format
3. 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 – select the list name from the dropdown.
- ID– pass the ID from the dynamic content value
- Title – choose the title value from dynamic content
- ProductPriceinCurrency – Pass the outputs of the compose data operation, which already formats the number value as a currency value.
Outputs('Compose')
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 called Wired Mouse with a Product Price 38 , as highlighted below:
Once the flow runs successfully, We can see that the number value is formatted as a currency value and updates the values in the SharePoint list ProductPriceinCurrency column.
This is how to update the SharePoint list field with formatted currency value using Power Automate flow.
Conclusion
Now, you can easily format a number as currency using the Format Number action or the Format Number function in Power Automate.
In the first example, I have shown you how to format a number value as a currency value by using the Power Automate Format Number action with standard format.
In the second example, I have shown you how to format a number value as currency value by using the Format Number function with a custom format in Power Automate.
Finally, I have shown you how to update the SharePoint list field with Formatted Currency Value using Power Automate flow.
You may like the following tutorials:
- Convert String to Float in Power Automate
- Convert a String to a Decimal Number in Power Automate
- Convert a String to an Integer in Power Automate
- Replace Commas with New Lines in Power Automate
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.