### Title

preventing a calculation running when a field is empty.

### Post

I have to measure two volumes before and after removing some of the volume, calculate the proportion removed as a percentage and keep track of the average amount removed.

I have a calculation that assesses how much the volume has changed as a percentage after some is removed.

((first volume - second volume) / first volume) x 100

I then have a field that tells me the average volume removed for all the records. Currently I have many records that haven't had the procedure that removes the volume so the second volume field is empty. Currently my calculation ( which may need modification) calculates with the second field empty and a result of 100% ( first volume - 0 )/ first volume) = 1 , the x100 = 100% which is the volume remaining. Should really be zero of it was the percentage removed.

First , I am a bit confused about the calculation and may well have got it wrong.

Second, I would prefer the calculation not to run until both fields were complete as it is having an undue influence on the average.

I know you can specify the calculation not to run in the manage database dialogue

'do not evaluate of all reference fields are empty' , but can this be done if only one field is empty ?. Currently the calculation is assuming the field is zero rather than empty.

many thanks

If you want the field to remain empty instead of show a zero you just remove the zero and keep:

""

Like so:

If (IsEmpty (FirstVolume) or IsEmpty (SecondVolume) ; "" ; ((first volume - second volume) / first volume) * 100 )

Or if you use the other calculation (mine)

If (IsEmpty (FirstVolume) or IsEmpty (SecondVolume) ; "" ; SecondVolume / FirstVolume )