Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Jun 2004
    Location
    Whistler, Br. Columbia, Canada
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Average of multiples fields, ignoring zeros

    ccr.PNG

    I've got a number of responses to our comment card forms entered into a db and I've begun to analyse the data. Each department has multiple fields/categories they are scored on. One thing I'd like to do is get an average for the department, while not counting the zero results (indicates no response). I've calculated the averages for each category
    Code:
    =Avg(IIf([BookingExperience]=0,Null,[BookingExperience]))
    but if I try get a department average using
    Code:
    =(Avg(IIf([BookingExperience]=0,Null,[BookingExperience]))+Avg(IIf([Friendly]=0,Null,[Friendly]))+Avg(IIf([Helpful]=0,Null,[Helpful]))+Avg(IIf([Knowledgeable]=0,Null,[Knowledgeable])))/4
    I get incorrectly weighted results (not shown in screenshot), or errors if there are null values (ie: Guest Rooms, week 18).

    Eventually I'm going to want quarterly averages, overall averages, etc, and will probably want to present them in other places than just this report, so should I be doing my calculations elsewhere (currently just in the field of the report) so that they can be called for charts, other reports, etc?

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Lounger
    Join Date
    Feb 2011
    Posts
    43
    Thanks
    0
    Thanked 6 Times in 6 Posts
    Look up Access help on DAvg and use the criteria "FieldName Not Is Null"

Posting Permissions

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