How to Convert a Number to Rounding UP or Down in Power Automate?

Do you want to convert a number to rounding up or down in Power Automate? In this Power Automate tutorial, we will see how to convert a number to rounding up or rounding down value in Power Automate.

Here, we will cover the topics below:

  • How to convert a number to rounding up in Power Automate
  • How to convert a number to rounding down in Power Automate.

How to convert a number to rounding up in Power Automate

Here, we will see how to round up a number in Power Automate.

Let’s first understand what the rounding-up number is in Power Automate. The process of increasing a number to the nearest higher value according to a stated rule or convention is known as rounding up.

The general rule for rounding up is that if the digit being rounded is 5 or greater; we round up to the next higher number.

For example:

Rounding to the nearest whole number

  • Rounding up the 3.6-> 4

Rounding to a specific decimal place, like tenths

  • Rounding up to 3.62 -> 3.7

Now, let’s see how we can round up a number in Power Automate.

Example 1:

For example, we have a number like 45.863, but we want to format this number to round up i.e., 46. To implement this, follow these steps:

1. Open Power Automate Cloud, click on Create, and select Instant Cloud Flow.

How to convert number to round up or down using Power Automate

2. Then, provide the flow name and select the “Manually triggered a flow” action. Then click on Create.

convert number to round up or down Power Automate

Now, you can see the “Manually trigger a flow” action is added to the flow page.

Power automate convert number to round up

3. Next, we will initialize a variable and provide a float number; for this, click on +New step -> select Initialize variable action. Then provide the below information:

  • Name: Provide the name of the variable.
  • Type: Select the type as float
  • Value: Then provide the value to convert.
Power automate convert number to round up format

4. Now, we will round up the number; for this, click on the +New step -> select Compose action. Then provide the below information:

  • Inputs: Provide the below expression
formatNumber(variables('Num'),'#0')

or

formatNumber(variables('Num'), 'N0')
convert number to round up in Microsoft Power Automate

5. Run the flow manually, and you can see the result: the number is rounded up.

convert number to round up in Power Automate

Example 2:

For example, we have a number like 45.863, but we want to format this number to round up i.e., 46.9.

To do this in the above flow, we need to change the expression in the compose action, so provide the below expression.

formatNumber(variables('Num'),'#0.0')

or

formatNumber(variables('Num'), 'N1')
Power Automate format number to round up format

Now save the flow and run the flow; you can see the result: the number is rounded up.

 format number to round up in Power Automate

This is how to convert a number to rounding up on Power Automate.

Convert a number to rounding down in Power Automate

Here, we will see how to convert a number to rounding down in Power Automate.

Let’s first understand what is rounding down a number. The process of lowering a number to the nearest lower value according to a specific rule or convention is known as rounding down.

The general rule for rounding down is that if the digit being rounded is less than 5; you round down to the next lower number

For example:

Rounding to the nearest whole number

  • Rounding up the 3.23 ->3

Rounding to a specific decimal place, like tenths

  • Rounding up to 3.24 -> 3.2

Example 1

For example, we have the number 45.23, and we will round down the number, i.e. 45. For this, follow the below steps:

1. Open Power Automate Cloud, click on Create, and select Instant Cloud Flow.

How to convert number to round up or down using Power Automate

2. Then, provide the flow name and select the “Manually triggered a flow” action. Then click on Create.

convert number to round up or down in Power Automate

Now, you can see the “Manually trigger a flow” action is added to the flow page.

Power automate convert number to round up

2. Next, we will initialize a variable and provide a float number; for this, click on +New step -> select Initialize variable action. Then provide the below information:

  • Name: Provide the name of the variable.
  • Type: Select the type as float
  • Value: Then provide the value to convert.
convert number to round down in Power Automate

3. Now, we will round down the number; for this, click on the +New step -> select Compose action. Then provide the below information:

  • Inputs: Provide the below expression
formatNumber(variables('Num'),'#0')

or

formatNumber(variables('Num'), 'N0')
convert number to round down in Microsoft Power Automate

4. Now, run the flow manually, and you can see the number is rounded down.

convert number to round down Power Automate

Example 2

For example, we have a number like 45.23, but we want to format this number to round down i.e., 45.2.

To do this in the above flow, we need to change the expression in the compose action, so provide the below expression.

formatNumber(variables('Num'),'#0.0')

or

formatNumber(variables('Num'), 'N1')
convert number to round down using Power Automate

Now save and run the flow; you can see the result: the number is rounded down.

How to convert number to round down using Power Automate

This is how to convert a number to rounding down on Power Automate.

Conclusion

In this Power Automate tutorial, we saw how to convert a number to rounding up or down in Power Automate.

You may like the following tutorials:

>