Results 1 to 7 of 7
  1. #1
    navychief is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    7

    One Field total records count and percentage of null values


    I would like to add to the bottom of my report total records, then compare it to total number of null values in one field, then give an over all percentage of those values that are not null. Now the truly important question is how do I do it? Care to enlighten me?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    An expression in textbox in footer:

    =Sum(IIf(IsNull([fieldname]), 1, 0))

    or

    =Sum(IIf(IsNull([fieldname]), 0, 1))
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    navychief is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    7
    Used the expression you typed. Tried both and both times come back with "The expression you entered is missing closing parenthesis, bracket (]), or vertical bar(I)"

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Sorry, need another ) at the end. I corrected the post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    navychief is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    7
    =Sum(IIf(IsNull([Last KAS BOOK COMPLETED]),0,1) exact way I have typed it in

  6. #6
    navychief is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    7
    Tried it the corrected way =Sum(IIf(IsNull([Last KAS BOOK COMPLETED]),1,0)) and =Sum(IIf(IsNull([Last KAS BOOK COMPLETED]),0,1)) still not go. Do I need a space before zero and one?

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    The spaces are irrelevant.

    Same error message?

    The textbox is in footer section?

    [Last KAS BOOK COMPLETED] is a field in the RecordSource?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 01-24-2013, 05:50 PM
  2. Can I count Null values in a totals query?
    By bgephart in forum Queries
    Replies: 2
    Last Post: 08-29-2012, 10:13 AM
  3. Total Query(One field with Null value)
    By vidplaylist in forum Queries
    Replies: 1
    Last Post: 11-30-2011, 03:57 PM
  4. Count() and Null Values
    By jpvonhemel in forum Queries
    Replies: 4
    Last Post: 10-21-2011, 03:37 AM
  5. Creating a percentage of total records report
    By sai_rlaf in forum Reports
    Replies: 3
    Last Post: 08-12-2011, 11:39 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