Results 1 to 2 of 2
  1. #1
    epardo87 is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Dec 2016
    Posts
    102

    Incremental Count or sum


    Hello there,

    I'm trying to recreate the following excel formula in a calculated field in an access query:

    EXCEL: =SUMIFS(G:G,C:C,"<"&C2) where G:G is a "Score" column, "C:C" is the date column and "C2" its just the date in the current row, basically it is a SUM of all scores with earlier dates than the row's date.

    In access I have columns [Score] and [GameDate] within table [Data], I've been trying to figure out and looking in the web, I have found DSum and DCount examples but not quite as I'm trying to use them and I get errors when trying to work some formula, I need the one summarising all scores regardless of the team and then another column would be summarising the team scored before that date, any thoughts?

    the table has columns Key/GameDate/Team/Score

    pd. also, would the solution work the same for counting instead of sum?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Access doesn't handle this sort of query very well. Available methods can perform slowly with large dataset. Yes, same for count or sum or avg.

    1. correlated subquery, review http://allenbrowne.com/subquery-01.html#YTD

    2. domain aggregate functions

    Provide sample data. Build table in post or attach file. Show your attempted code.
    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. Incremental count
    By Thompyt in forum Programming
    Replies: 4
    Last Post: 12-13-2016, 07:51 PM
  2. COUNT Group Count Records COUNT FUNCTION
    By PMCOFFEY in forum Access
    Replies: 9
    Last Post: 11-09-2012, 09:40 PM
  3. Autonumbers and Incremental Numbers
    By stacies in forum Access
    Replies: 2
    Last Post: 01-27-2012, 02:53 PM
  4. Real Time Incremental Back Up
    By GrnMtn7 in forum Access
    Replies: 1
    Last Post: 10-15-2011, 05:29 PM
  5. Creating Incremental Receipt Numbers
    By JorgeCUC in forum Queries
    Replies: 15
    Last Post: 08-25-2011, 08:50 AM

Tags for this Thread

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