Round a number
Power Automate Desktop offers a wide range of actions for retrieving data from web pages and on-premises software.
In many cases, you can search for an action and do what you want just by dragging and dropping it.
However, when you want to reshape the data you’ve retrieved, you may often find that the actions don’t quite do what you need.
This article explains how to round a number retrieved from a web page or a specific on-premises program.
Implement by copying and pasting
Section titled “Implement by copying and pasting”Copy the following code and paste it into the Power Automate Desktop flow designer to add the action.
Variables.TruncateNumber.RoundNumber Number: 10.52 DecimalPlaces: 1 Result=> TruncatedValueImplement in Power Automate Desktop
Section titled “Implement in Power Automate Desktop”- In “Search actions”, type “Truncate number”.
- Enter the target number (10.52 in this case) in “Number to truncate”, and change “Operation” to “Round number”.
- In “Decimal places”, enter the number of decimal places to keep after rounding (1 in this case). The default is 3, and specifying 0 rounds the number to an integer.
- When you run the flow, the rounded value (10.5 in this case) is stored in the variable
TruncatedValue.