RE: Exclude zero-length strings in calculating average of a field

Tech-Archive recommends: Fix windows errors by optimizing your registry



Add a where statement to the query

Where Len(FieldName) > 0 and FieldName not is null

"Kathy Franklin" wrote:

> In Acccess 2003: I want to average individually 3 different payments fields
> by account, by year in a query in order to create a report based on it.
> During the current year some periods are of course zero-length strings
> because they haven't happened yet. When I try to average the payments the
> zero-length strings are counted as zeroes and skew the average (i.e., a
> quarterly account with two payments to date, as appropriate, is averaged over
> four quarters because the no-entry quarters are included in the calculation).
> I want an intentional zero payment to be counted, but not a blank.
.



Relevant Pages

  • Re: Prevent Duplicates
    ... When I run the query, I get parameter box for Payment Amount and Order ID. ... information from the Payments Table?? ... I do get the OrderID, ... > totals. ...
    (microsoft.public.access.reports)
  • Re: Prevent Duplicates
    ... There's a fair bit going on in that query. ... To get the subquery working correctly, create a new query into just the ... Type the subquery into the field, ... Remove the Payments table from this query. ...
    (microsoft.public.access.reports)
  • Re: Need some advice on how to do a form
    ... the subform default view is Continuous Form (or ... principal payments we ... We have a query I'll call the MASTER (we ... >field called CUSIP (the tracking number of a security). ...
    (microsoft.public.access.forms)
  • Re: Help with query
    ... Ive managed to write the query to summ the payments.... ... FROM tblSalesOrder SO INNER JOIN (tblDespatch D INNER JOIN (tblTransaction T ...
    (microsoft.public.access.queries)
  • Re: Tabular Form with an Outer Join
    ... >In the SELECT clause of your query, ... >For validation of the date, ... >> open sales with weekly payments. ... >> do to prepopulate the date field, ...
    (microsoft.public.access.formscoding)