Results 1 to 4 of 4
  1. #1
    Gabriel2012 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Nov 2012
    Posts
    31

    Averaging with a blank field

    Hello all, so here is my predicament; I am calculating an avg, in a query, based on two fields "CountofErrors" / "OrdersAudited". The issue I am running into is that on certain dates specific teams will have no errors, so the "CountofErrors" is simply blank, and not a zero, so no percentage calculates. I need to calculate a 0% value in this field, how would I go about doing that?



    Thank you!

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Is it Blank or NULL??
    You could try the function NZ() (see help)

    Something like:

    NZ([CountofErrors],0)

  3. #3
    Gabriel2012 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Nov 2012
    Posts
    31
    I assume it is Blank, every date has an audit but everydate does not have an error, I have a one way join which forces the date and amount of audits to show even if no errors were recorded for that date, so the count of error field would simply be blank. Unless I am missing something?

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Could be Blank, Empty or NULL. They are not the same thing. If there is nothing in the control, I would thing it is a NULL value

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Odd Averaging Function Needed
    By Heatshiver in forum Programming
    Replies: 2
    Last Post: 03-20-2012, 08:26 PM
  2. Access 2003 Averaging Question
    By swicklund in forum Queries
    Replies: 1
    Last Post: 02-11-2012, 02:31 AM
  3. Replies: 4
    Last Post: 05-11-2011, 03:06 AM
  4. Averaging Percentages in a form
    By DICKBUTTONS in forum Access
    Replies: 1
    Last Post: 11-18-2010, 01:22 PM
  5. Averaging with a conditional check
    By sarah in forum Queries
    Replies: 1
    Last Post: 10-05-2009, 05:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums