2 Replies Latest reply on Mar 24, 2014 3:35 PM by hanstrager

# Calculation field - rounding up and leave out value

### Title

Calculation field - rounding up and leave out value

### Post

I have a 2 questions, which I think could be quite basic.

1st question: I have a calculation field that is calculating a price, for a product based on different materials. I want to have this to always round up to the the nearest 5's... so 1-4 would = 5 and 6-9 would = 10

Tried to look into the round() function, but couldn't get it to work.

2nd. question: Is it possible to have the calculation field not show a value if one of the fields it’s calculations have no input.

• ###### 1. Re: Calculation field - rounding up and leave out value

Ceiling( your_price_field / 5 ) * 5

Note: the Ceiling function may not work the way you want for negative prices.

One option is to use a Case statement in the calculation to test each field in the formula ( not IsEmpty(…) )

• ###### 2. Re: Calculation field - rounding up and leave out value

Rounding up is working perfect

Having a bit of a problem getting the Case statement to work with a 'not IsEmpty' formula. How does this exactly work when I want the calculation field to be empty if one of field1, field2 or field3 is empty (fx: field1 + field2 - field3 = calculation field)