When working in Power Automate, you’ll often need to convert data between different types. One common scenario is converting a string to a decimal. This is especially useful when dealing with numeric data stored as text, such as prices, quantities, or financial data extracted from a SharePoint list or Excel file.
For example, imagine you have a flow that processes order details from a SharePoint list where the price column is stored as a string. You’ll need to convert that string into a decimal to perform calculations like summing the total or applying discounts. Power Automate won’t treat the value as a number without this conversion, leading to errors or unexpected results.
In this tutorial, I will tell you how to convert string to decimal in Power Automate.
Convert String to Decimal in Power Automate
We can achieve this using two functions: float() and decimal(). Both functions serve similar purposes but have slight differences in behavior:
- float(): Converts a string into a floating-point number. This is useful when you need a number with decimal precision.
- decimal(): Converts a string to a decimal value with control over the number of decimal places.
Let’s see with the help of an example:
Example 1: [Convert String to Decimal in Power Automate Using float() Function]
Suppose you have a string value “49.99” that represents a price. Before performing any calculations (applying discounts), you must convert the string to a decimal format in Power Automate.
1. In Power Automate, create an Instant Cloud Flow by Manually trigger a flow.

2. Add an Initialize Variable action for storing string and provide below parameters:
- Name: varInputString
- Type: String
- Value: 49.99

3. Add a compose action and provide the below expression:
float(variables('varInputString'))

4. Add another Compose action to apply a 10% discount:
mul(outputs('Compose'), 0.9)

Save your flow and run it manually. Check the output of the Compose actions:
- The first Compose will show the decimal:

- The second Compose will show the discounted:

Example 2: [Convert String to Decimal in Power Automate Using decimal() Function]
Imagine you have a SharePoint list named Orders that contains a Price column. The Price column stores numeric values as strings (e.g., “199.99”). You want to create a flow in Power Automate to process these order details and convert the string values into decimals.

Now follow the below steps:
1. Create an Instant Cloud Flow with the ‘Manually trigger a flow’ trigger. Then, add the ‘Get items‘ action to retrieve data from the SharePoint list and provide the following parameters:
- Site Address: Select or enter the URL of your SharePoint site.
- List Name: Select the name of your SharePoint list (Orders).

2. Add a ‘Compose’ action to display the price. Then, provide the price from the dynamic content of the ‘Get items’ action.
It will automatically add a ‘For each’ loop.

3. Add another compose action and provide the below expression:
decimal(item()?['Price'])

Save your flow and run it manually. Review the output of the Compose actions:
- The first Compose shows the price in string format.

- The second Compose shows the price in decimal format.

Conclusion
In this tutorial, we learned how to convert a string into a decimal in Power Automate, a crucial step when working with numeric data stored as text, such as prices or quantities. We explored two functions, float() and decimal(), and saw how each can convert a string to a decimal. Through practical examples, we demonstrated how to use these functions to process data, apply discounts, and work with data from a SharePoint list.
You may like the following tutorials:
- Convert String to Date in Power Automate
- Convert String to Integer in Power Automate
- Convert a String to an Array in Power Automate
- Convert String to Object in Power Automate
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com