Skip to content

Get the decimal part of 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 get the decimal part of 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.GetDecimalPart Number: 3.1454 Result=> TruncatedValue
  1. In “Search actions”, type “Truncate number”.

  2. Set the parameters as follows.

    Parameter Value
    Number to truncate 3.1454
    Operation Get decimal part
  3. When you run the flow, the decimal part (0.1454 in this case) is stored in the variable TruncatedValue.