Rounding up numbers in a custom form | Community
Skip to main content
Level 7
June 6, 2016
Question

Rounding up numbers in a custom form

  • June 6, 2016
  • 11 replies
  • 1579 views
We have created a custom form that contains two calculated fields called Planned Hours and Actual Hours. We have added a conversion formula to show the number in days rather than hours. When you view this custom form attached to a project, both these numbers show up with too many decimal places so we've tried to add an expression to round them to one decimal place but it doesn't seem to do anything. This is the formula we're using, what are we missing? ROUND((Actual Hours/60/7.5),1)
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

11 replies

Level 10
June 6, 2016
I don’t think it can do math inline. I think you have to have a discreet value as the first operator (Actual Hours) and not a formula. Eric
Level 4
June 6, 2016
Just for the heck of it, you might try adding some parentheses to it to clarify the order of operations. It might be getting confused by trying to do too much at once. So, something like: ROUND((Actual Hours/60)/7.5,1)
LauraRa1Author
Level 7
June 7, 2016
Ok, so can I round it in a report? If so what expression would I use? Thanks Eric ‚ò∫ Laura Ray Project Support Analyst Bakkavor Information Systems Bakkavor Group West Marsh Road, Spalding, Lincolnshire, PE11 2BB, UK Direct: +44 (0)1775 763 010 www.Bakkavor.com // Laura.Ray@Bakkavor.com< [cid:image001.png@01D1C097.E4BDBE50] [cid:image002.png@01D1C097.E4BDBE50]
Level 9
June 7, 2016
I agree with Kathy in adding parenthesis to the equation. Also, rounding and displaying can be 2 different things. In other words, we have a value the shows 1 decimal. If the true value is 11.111111, if we round to 1, we'll see 11.1 as expected, but if we round to 0, we'll see 11.0, not just 11. (if round to 3, we'll see 11.111). So the question is, is it truely not rounding, or is it showing too many decimal places?
Level 9
June 7, 2016
If you are looking just to get the full day, never mind the decimals.. you can use FLOOR. FLOOR(SUM(1.2345,2)) --> this would just give you 3.
LauraRa1Author
Level 7
June 8, 2016
Hi Greg, good point! It’s actually about showing too many decimal places, I really don’t care about it rounding to be honest, it will be close enough to say 1.1 days, we’ll get the gist from that. Thanks ☺ Laura Ray Project Support Analyst Bakkavor Information Systems Bakkavor Group West Marsh Road, Spalding, Lincolnshire, PE11 2BB, UK Direct: +44 (0)1775 763 010 www.Bakkavor.com // Laura.Ray@Bakkavor.com< [cid:image001.png@01D1C15D.9F609000] [cid:image002.png@01D1C15D.9F609000]
LauraRa1Author
Level 7
June 8, 2016
Thanks Polly, If I can’t get the result to 1 decimal place then I’ll use the ‘FLOOR’ option. ☺ Laura Ray Project Support Analyst Bakkavor Information Systems Bakkavor Group West Marsh Road, Spalding, Lincolnshire, PE11 2BB, UK Direct: +44 (0)1775 763 010 www.Bakkavor.com // Laura.Ray@Bakkavor.com< [cid:image001.png@01D1C15D.B4F46590] [cid:image002.png@01D1C15D.B4F46590]
LauraRa1Author
Level 7
June 9, 2016
We are more interested in displaying to one decimal point that the number being rounded, is this possible in this case Eric?
Level 9
June 9, 2016
Have you tried this? ROUND((DIV(392,60,7.5)),1) where 392 is your actual hours? This shows up 0.9 for me. Cheers.
LauraRa1Author
Level 7
June 10, 2016
Applied this expression and it doesn’t correct the number in either the custom form fields or a report. Open to other suggestions, thanks ☺ Laura Ray Project Support Analyst Bakkavor Information Systems Bakkavor Group West Marsh Road, Spalding, Lincolnshire, PE11 2BB, UK Direct: +44 (0)1775 763 010 www.Bakkavor.com // Laura.Ray@Bakkavor.com< [cid:image001.png@01D1C31C.B6842830] [cid:image002.png@01D1C31C.B6842830]