Null Value & DAvg (1 Viewer)

LED

New member
Local time
Today, 01:19
Joined
Oct 18, 2006
Messages
1
Hello,

I have a table that I need to run DAvg on for each column. It works on the first column that does not have any Null values, but I get a data type mismatch error on the second column that contains Null values. According to the help file, DAvg should be able to handle Null values.

Any ideas on how to get this to work?

Thanks!
 

MStef

Registered User.
Local time
Today, 07:19
Joined
Oct 28, 2004
Messages
2,251
Hello LED!

I suggest to make an UPDATE QUERY,
and update all NULL VALUES in 0.
 

Johny

Registered User.
Local time
Today, 08:19
Joined
Jun 1, 2004
Messages
80
You can also filter out the null values of that field if you specify it in the criteria parameter

btw LED from BooZZe?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 07:19
Joined
Sep 12, 2006
Messages
15,656
if you don't want to set the null values, then base yuor summary on a query, in which case you can change the nulls by setting the column to nz(myfield,0)

depends whether you want to include the nulls in the average or not
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:19
Joined
Feb 19, 2002
Messages
43,275
If you're getting a type mismatch, the column is probably not numeric. Nulls do not present a problem for domain functions. They are simply ignored. For example the average of 2,4,null is 3 but the average of 2,4,0 is 2.
 

Users who are viewing this thread

Top Bottom