web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power automate round u...
Power Apps
Answered

Power automate round up a float value

(2) ShareShare
ReportReport
Posted on by 87

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

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Esox76 

     

    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

     

    Check here: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-round for more info

     

    See if the above helps @Esox76 

     

  • Esox76 Profile Picture
    87 on at

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

     

    Thanks

  • v-chenzhi Profile Picture
    Microsoft Employee on at

    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.

    vzhichen_0-1635487179991.png

    Here is the expression:

    if(less(int(last(split(string(variables('TT')),'.'))),int(5)),int(first(split(string(variables('TT')),'.'))),add(int(first(split(string(variables('TT')),'.'))),1))

    vzhichen_1-1635487179995.png

     

          

    vzhichen_2-1635487179997.png

     

    Best Regards,

    Zhi Chen

  • Esox76 Profile Picture
    87 on at

    @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

  • Verified answer
    v-chenzhi Profile Picture
    Microsoft Employee on at
    Hi @Esox76,

     

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

    Please try the following formula:

     

    if(less(length(split(string(variables('TT')),'.')),int(2)),int(first(split(string(variables('TT')),'.'))),if(less(int(last(split(string(variables('TT')),'.'))),int(5)),int(first(split(string(variables('TT')),'.'))),add(int(first(split(string(variables('TT')),'.'))),1)))

     

     
    Best Regards,
    Zhi Chen
  • Esox76 Profile Picture
    87 on at

    @v-chenzhi Solution works very well Thank You 

     

    Esox

  • hemrhk Profile Picture
    361 on at

    This blog post solves Round off problems

    https://365stack.in/index.php/2022/01/01/how-to-round-up-down-decimal-in-power-automate/ 

     

    Follow 365 Stack for more updates.

  • JRockO Profile Picture
    10 on at

    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.

  • smharrod Profile Picture
    33 on at

    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.

  • NotPoodle Profile Picture
    40 on at

    Wouldn't it be wonderful if there was simply a round function available in power automate instead, like Round(NumberDecimalPlaces) as poweractivate suggested, instead of the crazy convoluted way you actually have to do it in PA.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard