rcacciato Posted May 21 Posted May 21 (edited) 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. Edited May 21 by rcacciato typo
comment Posted May 21 Posted May 21 (edited) 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: (Note that for display only the calculation could be just: enp2023 / 10^6 and the formatting would do the rest.) Edited May 21 by comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now