1. ## Null value

I need to reset a numeric field to null so that it isn't included in summary calculations. There is no NULL value in A5 as there is in MS A^\$&amp;%&amp;. Is there a way to void the value in a numeric field?

Thanks

Dave

2. ## RE: Null value

David,

Why not assign the field a value of zero ?

-- tom

3. ## RE: Null value

If I'm trying to find the mean of a set of numbers and I'm missing one of the numbers, the mean will be calculated without including that number. If I set the missing number to 0, the mean is calculated using a value of 0.

4 4
missing 0
5 5
4 4
3 3
5 5
3 3
___ ___
mean = 4.0 mean = 3.4

4. ## RE: Null value

Perhaps the new null_value() function will do the trick for you. If it were me, I'd probably use a brute force method:

1) total the field values
2) count the non-zero records
3) divide the total by the non-zero record count

-- tom

5. ## RE: Null value

Thanks,

the brute force method would work for simple stats like mean, but are more complex for things like variance and stan dev.

as far as i can tell, the Null_Value function doesn't work in an expression. At least I couldn't get it to work in an update expression. Be nice if is did ....

thanks again.

dave

6. ## RE: Null value

An alternative would be to query the table for records with non-zero field values, and run your calculations against the queried subset of the entire table.

Yet another approach would involve copying the non-zero records to a temporary table for further processing there.

-- tom

7. ## RE: Null value

.dbf tables do not support the concept of a null value as some sql databases do.

a numeric field has value of 0 if no previous value has been assigned to it.

you could 'simulate' a null value by putting some special value in the field e.g. -999999

then, when you compute a summary value on this field, you could ignore records with -99999 in the field

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•