Mar 25, 2020 03:32 PM
I’ve been trying to display a Currency US Dollars with the traditional 2 digit cents, e.g. $24.31
But Airtable is not honoring the formating that’s been specified for my Cost Bais field. WHY?
See the images
Is there a way (easy) to make Airtable treat the floating point number as a dollar & cents figure?
Solved! Go to Solution.
Mar 25, 2020 03:42 PM
You can surround your reference to the {Cost Bias}
field in a ROUND()
function:
<the rest of your formula> ... & ROUND({Cost Bias}, 2)
As to this:
This is true for all number fields in Airtable - the formatting applied to number values of any type displayed in a field is just that – only formatting. Behind the formatted number, the fields are always holding a precise (exactly how precise I don’t know) float. It’s probably a good thing, as, in the long run, it provides the most flexibility and accuracy to calculations chained through multiple formula fields. And it gives you the control over when and how to round values.
Mar 25, 2020 03:42 PM
You can surround your reference to the {Cost Bias}
field in a ROUND()
function:
<the rest of your formula> ... & ROUND({Cost Bias}, 2)
As to this:
This is true for all number fields in Airtable - the formatting applied to number values of any type displayed in a field is just that – only formatting. Behind the formatted number, the fields are always holding a precise (exactly how precise I don’t know) float. It’s probably a good thing, as, in the long run, it provides the most flexibility and accuracy to calculations chained through multiple formula fields. And it gives you the control over when and how to round values.
Mar 25, 2020 06:06 PM
And apparently not as precise as one might think.
Mar 26, 2020 09:22 AM
Thank you @Jeremy_Oglesby & @Bill.French … Round() is a better solutions that the .32999999 but … if it’s not one thing … it’s another. Round() doesn’t abide the typical 167.00 e.g. dollar AND cents… see image.
Mar 26, 2020 09:23 AM
I dare say it but ol Fortran 77 had better formatting …
Mar 26, 2020 09:33 AM
Formatting numbers in formulas that combine numbers and text has long been an issue.
Check out W_Vann_Hall’s pretty print routines.
Mar 26, 2020 09:43 AM
WOW… Thanks @kuovonne - not sure I want a programming lecture along with the solutions…
I happen to know that Pretty Printing is a tough subject with lots of caveats.
Is there a short answer to incorporate those routines into my Base?
Said another way - I’m using Airtable - BECAUSE I don’t wish to HAVE to program solutions like Pretty Print.
Mar 26, 2020 10:03 AM
@David_Koontz You can download the demo base, find the field with the formatting that you want, and then copy the formula. You will have to edit the formula slightly to fit your field names.
Mar 26, 2020 10:26 AM
And the nightmare begins - coding pretty much everything a code-free environment. :winking_face: