Passer au contenu principal
Adaptive Insights
Knowledge and Support - Adaptive Insights

How to Write a Formula to Round Up or Down

This article includes suggestions and workarounds. Content may not be accurate for all use cases or represent best practices for the latest release. 


Do you have an enhancement that will round to specified number of digits because currently formula function Rounds the number N up or down to the nearest whole number only?


There is not currently a function that allows you to round a number to a specified number of digits, but you can use the Trunc function to achieve the same results. For example, if the you wanted to round a value to the nearest hundred, you would truncate the value that is divided by one hundred, and then multiply by one hundred, the end result would be the value rounded to a hundred value. Your formula would be similar to the following:

=if(((div(ACCT.Expenses,100)+100)>(trunc(div(ACCT.Expenses,100))+100)), trunc(div(ACCT.Expenses,100))*100, div(ACCT.Expenses,100)*100)=

  • Cet article vous a été utile ?