Skip to content

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.

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=> TruncatedValue
  1. In “Search actions”, type “Truncate number”.
  2. Enter the target number (10.52 in this case) in “Number to truncate”, and change “Operation” to “Round number”.
  3. 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.
  4. When you run the flow, the rounded value (10.5 in this case) is stored in the variable TruncatedValue.