Jump 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.

Displaying millions and rounding

Featured Replies

I have a database of airports and have a layout where I show airport info. Here is a screenshot of the Canadian airport data:

The 4th column shows enplanements, or the number of passengers boarding flights (the field name is "enp2023"). I use this formula to display the numbers as X.XM (millions to one decimal place). This is the formula for the field:

Round(enp2023/1.0e+6;1)&"M"

However when it is an even million the number is truncated and doesn't show 4.0M (as for Edmonton) but simply 4M. I'd like it to display as shown in the rightmost column (these have been entered manually), as 4.0M. How do I do that?

Thanks in advance.

Screenshot 2025-05-20 at 10.50.44 PM.png

Edited by rcacciato
typo

6 hours ago, rcacciato said:

when it is an even million the number is truncated and doesn't show 4.0M (as for Edmonton) but simply 4M.

You need to separate between rounding and formatting.

Rounding is a numerical operation that results in a number - and numbers do not have trailing zeros or characters that indicate units. Your calculation attempts to do both rounding and formatting but it fails to add a trailing zero where required.
 

I would suggest you let your calculation do only the rounding part:

 Round ( enp2023 / 10^6 ; 1 ) 

and set the result type to Number.

Then format the field instance on the layout to display as Decimal with a fixed number of decimals and a trailing symbol:

image.png.1d0d48d524d37a2cb6937a03470d8305.png


(Note that for display only the calculation could be just:

enp2023 / 10^6

and the formatting would do the rest.)

 

Edited by comment

  • Author

Thank you! I can't believe I missed that...

Create an account or sign in to comment

Important Information

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

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.