Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Round Up or Down

Featured Replies

Hi

Have searched for the answer but can't find.

I have a number field that returns a decimal.

I would like to round 1.5 and under to 1 and 1.6 and over to 2 etc.

I think this should be easy but haven't found the ceiling, floor, round calcs or any combination to work.

Thanks so much!

Note: Using XP 8.5 Advanced (at work)

  • Author

Hi

I think I got it.

Round ( Truncate ( Abs (zzDays since receiving - zzElapsedTimeSetUp)/30 ; 1 ) ;0 )

This has a few other things thrown in but basically it's

Round ( Truncate ( NumberField ; 1 ) ;0 )

Thanks for the mind field!

Hi

try:

Let([

n = YourNumberField ;

d = Length ( Mod ( n ; 1 ) )

];

Round ( n - 10 ^ - d * Sign ( n ) ; 0 )

)

:qwery:

doesn' this do the same thing?

Round ( YourNumber ; 0 )

  • Author

Comment / Lee

You're both absolutely right! (Especially Comment lol)

I didn't quite understand the the "precision" part of the calc when using 0. :

Thanks for your time.

doesn' this do the same thing?

Round ( YourNumber ; 0 )

no...

Round ( 1.5 ; 0 ) returns 2 and not 1 as asked.

P.S.: it wasn't asked but my calc also reverts the rounding for negative numbers, so that -1.5 rounds up to -1

  • Newbies

Another approach

round( yourNumber - .1, 0)

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.