The Round function performs the mathematical round of a number to a specific number of decimal places. It uses the rules defined “Half Round-Up” where it rounds up if the last digit is 5 or more and low if not. For example, Round(3.14159,4)
will return 3.1416 and Round(3.14159,2)
will return 3.14.
Limitations
- Convert multi-column tables before being able to use the Round function.
- If you want to round always up or down, you need to use the alternative functions RoundUp or RoundDown.
Recommendations:
- Unless you want a mathematically correct rounding, I recommend using, for clarity, RoundUp or RoundDown. By doing this, you have a clear direction of the rounding.
- You can round an entire table (single column). The Round function will return a new table with the rounded values.
- Only use rounding when you want to present a lot of information in a compact view. For calculations ensure you’re using the original values.
- Be careful when rounding to get an integer number. Always think if the rounded value will make sense, otherwise, keep at least one decimal place to provide a little bit more context to the user. To do so just do Round(“3.14”,0) .
- Use any of the round functions (Round, RoundDown or RoundUp) instead of Text when displaying the information. You can get the same result as above just by using,
Text((3.14159),"[$-en-GB]#0")
but you’d be losing clarity in the formula and not in control in the rounding direction. Use this formula only if you want a strict display of the result like keeping the right-hand zeros, for example. - You can perform arithmetic operations within the function. For example,
Round((3.14159/4),2)
returns 0.79. - Arithmetic operations can contain variables but, if the value is not a number, the result will be empty and not an error, so be careful when setting the variables.
Localization
- Please note that formulas may have localization-based differences. For example, you should write
Round("3.14",2)
with “,” separating each of the arguments, but if your localization is Portugal, you should use “;” instead.
Sources:
Round, RoundDown, and RoundUp functions in Power Apps
Back to the PowerApps Function Reference
Featured Image by Kevin Crosby on Unsplash
UPDATED:
2020-09-03: My thanks to Larry for spotting a typo in this article.
I appreciate your website. It’s nicely done and very helpful. Sorry, please see the typo in the 1st paragraph at https://manueltgomes.com/reference/powerapps-function-reference/powerapps-round-function/ :
“Round(3.14159,4) will return 1.1416” should read “For example, Round(3.14159,4) will return 3.1416”.
Hey Larry,
Thanks for the kind words.
You’re awesome, and 100% correct. That is a typo.
Thanks for pointing that out.
Cheers
Manuel