Results 1 to 5 of 5
  1. #1
    ATTHECROSS is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    14

    Need Help Obtaining The Running Total Of A Count And Grouping It By Month

    Hello All -

    Here is my SQL for this query:

    /SELECT [Q_OH-IFC_CO].ACTUAL_FINISH, Q_FiRM_PROJECT_DATA.POLE_COUNT_PER_SECTION
    FROM Q_FiRM_PROJECT_DATA LEFT JOIN [Q_OH-IFC_CO] ON Q_FiRM_PROJECT_DATA.PROJECT_ID = [Q_OH-IFC_CO].PROJECT_ID
    WHERE ((([Q_OH-IFC_CO].ACTUAL_FINISH)>#1/1/2018#) AND ((Q_FiRM_PROJECT_DATA.PROJECT_TYPE)="OH") AND ((Q_FiRM_PROJECT_DATA.JOB_TYPE)="Reconductor" Or (Q_FiRM_PROJECT_DATA.JOB_TYPE)="Long Span"))
    ORDER BY [Q_OH-IFC_CO].ACTUAL_FINISH;/


    FYI:
    - The count is in whole numbers
    - the finish dates have a format of 1/1/2018

    What I am trying to do is get a simple cumulative (running) total of the (pole) count that is grouped by month. I don't need the year in there since the cumulative total starts in January and runs to december 31st and then I will move the ">" date to the next year. I am trying to get this data to be my source data for an excel line chart.



    I have tried for hours to figure this out. I have tried using Dsum to get the cumulative total but then can't figure out how to break it out by month. I am not sure what I am missing.

    Thanks for the help.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Have you considered the RunningSum property of textbox on report?
    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
    ATTHECROSS is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    14
    I haven't because I generally produce excel output from my access data rather than working with access reports. So I am not real familiar with access reports.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    think you need to go back a step and also provide the sql to Q_FiRM_PROJECT_DATA. At the moment I don't see any fields you can use to provide what you want. Would also help to see some example raw data and the required outcome to ensure we are not talking at cross purposes.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    https://support.microsoft.com/en-us/help/290136/how-to-create-a-running-totals-query-in-microsoft-access

    Ajax makes a good point. Might have to build another query with DSum() that uses posted query as source.

    Expect this type of query to perform very slowly with large dataset.

    Also advise you learn about Access reports. I once inherited a db that used Excel as user interface for data entry and reporting. Quickly learned how to use Access forms and reports to accomplish the same and totally eliminated Excel.
    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: 6
    Last Post: 09-14-2015, 06:05 PM
  2. Replies: 6
    Last Post: 11-05-2014, 03:00 PM
  3. Replies: 43
    Last Post: 08-06-2014, 08:21 PM
  4. Running Total on Amount for each Month?
    By aellistechsupport in forum Queries
    Replies: 4
    Last Post: 04-24-2014, 01:18 PM
  5. Running Sum divided by Month Total
    By kwooten in forum Reports
    Replies: 7
    Last Post: 05-16-2013, 10:20 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