Mar 21, 2019 09:19 AM
I got a field that summarises some numbers with some text.
One of the numbers needs to be rounded to a with 3 decimals so I wrap the number in ROUND(), but it only gives me a precission of 1.
'Total weight: ’ & ROUND({Total Weight},3) & ‘kg’
Gives me:
‘Total weight: 0.8kg’
But looking to get:
‘Total weight: 0.800kg’
What an I not getting?
Mar 21, 2019 09:45 AM
Check the formatting for your formula field. Decimal values default to only showing one place past the decimal point. You need to manually change the format to show more precision.
Mar 21, 2019 11:25 AM
Actually, in this case it’s not the formatting: It’s that Airtable doesn’t retain significant digits when converting from a number to a text string. You can use the code from my pretty-print routines — or I think this will do what you want:
'Total weight: '&
ROUND(
{Total Weight},
3
)&
REPT(
'0',
3-(
LEN(
ROUND(
{Total Weight},
3
)&''
)-FIND(
'.',
ROUND(
{Total Weight},
3
)&''
)
)
)&
' kg'
Edit: I chickened out and tested it, and it does do what you want. :winking_face:
Mar 25, 2019 09:41 AM
Thank you much appreciated, taking your time.