Sounds simple yeah? 130.3155 rounded to 3 dp is 130.316
Try this....
Round(130.3155, 0.001)
It gives 130.315
Why? and how can I get round to behave as expected?
Solved! Go to Solution.
Hi @craigja,
It looks as though the round function is rounding it down. I'll take a look at why in a little bit.
However you could add 0.001 to your value to get around the issue: Round([Value]+0.001, 0.001)
If this solves your issue please mark the answer as correct, if not let me know!
Jonathan
Hey @craigja
So this is a really weird issue that I've seen other people discuss on the message boards. The workaround that I use is to separate the number into a whole number and decimal, round the decimal separately, and then add the two values back together.
The formula to do it looks like the below. I've also attached a sample workflow for you.
ToNumber(REGEX_Replace(ToString([Field1]), "\.(.*)",""))+Round(ToNumber("."+REGEX_Replace(ToString([Field1]), "(.*)\.","")),0.001)
Let me know if this works for you.
Thanks!
Phil
Hi @Maskell_Rascal , really appreciate your workflow updated. It seems the solution does not work if there are more than 5 digits, can you help me with it? Thank you.
ToNumber(REGEX_Replace(ToString([Field1]), "\.(.*)",""))+Round(ToNumber("."+REGEX_Replace(ToString([Field1]), "(.*)\.","")),0.00001)
Hey @Paddi
I would try this formula:
Round(Round([original], .0001),.001)
Please accept as solution if it answered your question.
Hope this helps!
the solution which Maskell_Rascal provided is working for me. Can you provide an example number for which his solution is not working please?
thanks.