Results 1 to 5 of 5
  1. #1
    carojasa is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2015
    Posts
    18

    Summary Statistics

    See attached picture

    Click image for larger version. 

Name:	Capture.JPG 
Views:	11 
Size:	76.0 KB 
ID:	19774

    I have this table with several Fields labelled 1, 2.....n
    I want to generate summary statistics from all of my field columns but the problem i have is the following.



    1. Some records are empty "null"
    2. Some records are ''0''

    I want to perform calculations of summary statistics (mean, median, iqr, sdv, etc) all at once and exclude any ''null'' and ''0'' records from the process.
    I want to commit the calculated statistical values to a new table in which:
    The row headings are the name of the statistical parameter ( Mean, median, etc)
    The column heading corresponds to Field 1, 2, 3 etc
    The intersection of row and column heading is the result of the calculation.

    Is this possible?

    Thank you

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    Nulls are not included in aggregate calcs.

    Try:

    Sum(IIf([1]=0,Null,[1])

    How do you plan to do all those calcs? Except for Mean (Average) Access does not have intrinsic functions for the ones you listed.
    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
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    Are the 0 and Null fields real values or some "other issue"?
    I defer to June7 re Nulls and aggregate calculations.

    Where are these functions you wish to use?

    There may be an Excel expert here who can tell us more about the possibility of calling and using Excel functions from Access. My knowledge of Excel is extremely limited.

    I have done this when helping someone, so in concept ...
    Code:
      Sub xlChiInv()
                Dim obj As Excel.Application
    10          Set obj = CreateObject("Excel.Application")
    20          MsgBox obj.Application.ChiInv(0.05, 10)
    30          obj.Quit
    40          Set obj = Nothing
       End Sub
    You may find some ideas at this link.
    Last edited by orange; 02-20-2015 at 07:14 PM.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    It is possible to invoke Excel functions in VBA without having to set and declare Excel object. Don't forget to set Excel Object Library in VBA References. https://msdn.microsoft.com/en-us/lib...ffice.14).aspx

    I experimented with Excel functions in VBA when I needed to do matrix multiplication. I found that I got 3 different results:

    1. function calc done in Excel spreadsheet

    2. function calc done in VBA

    3. complex VBA code to emulate the Excel function
    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
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849

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

Similar Threads

  1. Statistics in report header
    By nurserich in forum Reports
    Replies: 5
    Last Post: 10-13-2014, 12:31 AM
  2. Replies: 1
    Last Post: 06-30-2014, 09:52 AM
  3. Access for tracking statistics
    By rjbeck52 in forum Access
    Replies: 2
    Last Post: 07-06-2011, 05:48 PM
  4. library statistics
    By sonia in forum Access
    Replies: 1
    Last Post: 04-11-2010, 12:22 PM

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