cancel
Showing results for
Did you mean:
Helper III

## Power automate round up a float value

Hi i have a float value in power automate that i would like to round up. Could someone point me in the right direction

e.g. 0.5 should be 1

1.5 should be 2

Thanks in advance Esoxs

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Hi @Esox76,

Sorry I did not consider the case where the decimal place is 0.

Please try the following formula:

Best Regards,
Zhi Chen
11 REPLIES 11
Most Valuable Professional

Use the Round function if you want 0.5 to be 1, 1.5 to be 2 - 0.3 to be 0, 1.3 to be 1, etc.

Round(NumberDecimalPlaces)

• Number - Required. The number to round.
• DecimalPlaces - Required. Number of decimal places to round to. Use a positive value to indicate decimal places right of the decimal separator, a negative value to the left, and zero for a whole number.

Or

Use the RoundUp function if you want it to always round up no matter what so 0.3 to be 1, 1.3  to be 2, etc.

RoundUp(NumberDecimalPlaces)

• Number - Required. The number to round.
• DecimalPlaces - Required. Number of decimal places to round to. Use a positive value to indicate decimal places right of the decimal separator, a negative value to the left, and zero for a whole number.

Example:

Round(7.9,0) would result in the number 8

Round(7.1,0) would result in the number 7

whereas

RoundUp(7.9,0) would result in the number 8

RoundUp(7.1,0) would result in the number 8 again

See if the above helps @Esox76

Helper III

Sorry @poweractivate  but this Round() function is not available in Power Automate

Thanks

Community Support

Hi @Esox76,

Do you want to round up a float in power automate flow?

I assume your float have one decimal place and have a test on my side, please try following workaround.

Here is the expression:

Best Regards,

Zhi Chen

Helper III

@v-chenzhi Thanks for this i have tested it but  there is a slight bug in that if my value is 5.0 it calculates it as 6 instead of 5. if it's 4.0 then it ok !

Regards Esox

Community Support
Hi @Esox76,

Sorry I did not consider the case where the decimal place is 0.

Please try the following formula:

Best Regards,
Zhi Chen
Helper III

@v-chenzhi Solution works very well Thank You

Esox

Responsive Resident

This blog post solves Round off problems

New Member

I'm a little late to the game, but you can use the "formatNumber(...)" expression in PowerAutomate to accomplish this.

I haven't done extensive testing to confirm proper rounding for large decimals, but 1.5 becomes 2 when using int(formatNumber(1.5, '0')).

Note: '0' is the string used for the number format.  You could also use '#' but I like to use '0' since it's a number and seems more straight forward when reading it.

Frequent Visitor

Thank you Zhi, everything else I tried (and mentioned here) either doesn't work or always rounds down. I will test some more to be sure, but your solution appears to work well. Crazy that there isn't a more straightforward solution such as RoundUp() function that works, but a very impressive workaround.

Announcements

#### April 4th Copilot Studio Coffee Chat | Recording Now Available

Did you miss the Copilot Studio Coffee Chat on April 4th? This exciting and informative session with Dewain Robinson and Gary Pretty is now available to watch in our Community Galleries!   This AMA discussed how Copilot Studio is using the conversational AI-powered technology to aid and assist in the building of chatbots. Dewain is a Principal Program Manager with Copilot Studio. Gary is a Principal Program Manager with Copilot Studio and Conversational AI. Both of them had great insights to share with the community and answered some very interesting questions!     As part of our ongoing Coffee Chat AMA series, this engaging session gives the Community the unique opportunity to learn more about the latest Power Platform Copilot plans, where we’ll focus, and gain insight into upcoming features. We’re looking forward to hearing from the community at the next AMA, so hang on to your questions!   Watch the recording in the Gallery today: April 4th Copilot Studio Coffee Chat AMA