Oct 06, 2023 03:58 AM
I have some numbers i need to include in a string.
These numbers needs to be rounded down to two decimals, which I use ROUND() to do, my problem comes if the number has trailing zero's fx:
Does anyone know how can keep the trailing zeros?
Solved! Go to Solution.
Oct 07, 2023 01:55 AM - edited Oct 07, 2023 01:56 AM
It looks easy, but it was a bit of a challenge.
ROUNDDOWN({Number}, 0) &
"." &
IF(
FIND(".",ROUND({Number}, 2)&""),
REGEX_EXTRACT(
ROUND({Number}, 2)&"0",
"\\.(\\d{1,2})"
),
"00"
)
There has been a number field update recently, and it would be nice if formatted numbers could be used in Formulas as well.
Oct 06, 2023 09:31 AM
Hi @Kim_Trager1
You should be able to resolve this issue by specifying the precision on your formula field in the formatting tab when you edit a field. If your formula field is a number you should get a result like this where you can specify the decimal places you would like to be visible.
Oct 06, 2023 12:18 PM
Thank you for this, however the number is part of a longer text. Like: "blablablabla £250.00 blablabla"
So it's how do I get the 250.00 to be "blablablabla £250.00 blablabla" instead of "blablablabla £250 blablabla"?
Oct 07, 2023 01:55 AM - edited Oct 07, 2023 01:56 AM
It looks easy, but it was a bit of a challenge.
ROUNDDOWN({Number}, 0) &
"." &
IF(
FIND(".",ROUND({Number}, 2)&""),
REGEX_EXTRACT(
ROUND({Number}, 2)&"0",
"\\.(\\d{1,2})"
),
"00"
)
There has been a number field update recently, and it would be nice if formatted numbers could be used in Formulas as well.
Oct 07, 2023 12:40 PM
This is beautiful, thank you so much. It was not as easy as I thought it would have been.