S
Skip Albertson
I have a complicated chemical result that I have calculated three
different ways in a query from raw data contained in a database (each is
a time series). I would like to make a new query of the first query that
calculates the means of the three estimations contained in the first
query (as a function of time), but some of the calculated fields are
nulls. I don't think I can use Avg or DAvg. I suspect I have to use sum
and count. Which version of count omits nulls and if I divide sum/count,
how do I avoid an error if count=0 (i.e., all are nulls)?
Mean: Sum([Field1]+[Field2])/(Count([Field1])+Count([Field2]))
only returns the correct answer when both fields are not null.
Mean: (Sum([Field1])+Sum([Field2])/(Count([Field1])+Count([Field2]))
is no different!!!
Thanks in advance for your help.
(e-mail address removed)
different ways in a query from raw data contained in a database (each is
a time series). I would like to make a new query of the first query that
calculates the means of the three estimations contained in the first
query (as a function of time), but some of the calculated fields are
nulls. I don't think I can use Avg or DAvg. I suspect I have to use sum
and count. Which version of count omits nulls and if I divide sum/count,
how do I avoid an error if count=0 (i.e., all are nulls)?
Mean: Sum([Field1]+[Field2])/(Count([Field1])+Count([Field2]))
only returns the correct answer when both fields are not null.
Mean: (Sum([Field1])+Sum([Field2])/(Count([Field1])+Count([Field2]))
is no different!!!
Thanks in advance for your help.
(e-mail address removed)