Results 1 to 8 of 8
  1. #1
    kwooten is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    255

    Running Sum divided by Month Total


    I am trying to do a running sum divided by the month total. The month total is a baseline and the running sum is for # of hours. I am trying to do cumulative hours per person. I had the Dsum formula working correctly but can seem to get it to divide by the reporting months baseline.. any ideas?

    =(DSum("[Training]","Relationship Mgt","[HRP LNAME]='" & [HRP LNAME] & "' AND [Month Number]<=" & [Month Number] & ""))/("[Portfolio Total]","Relationship Mgt","[HRP LNAME]='" & [HRP LNAME] & "' AND [Month Number]<=" & [Month Number] & "")

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You'd want a separate DSum() for the second value. You have all the parts of one but not the actual "DSum".
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    kwooten is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    255
    I dont want a running sum for the second part. Just what the value is for the reporting month.. My report is data by month so for example in February i would want the training total hours (January + February)/February baseline (Portfolio Total).. For April i would want (Jan+Feb+Mar+Apr)/April Baseline...

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Yes, I know what you want. It's still a DSum(), just different criteria.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    kwooten is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    255
    i thought if i did a DSum on the second piece then it would give me the running total for Portfolio Totals too... do i need to change to [Month Number]=" & [Month Number]?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    That's what I would try.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    kwooten is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    255
    that seems to have worked... is it better to do DSum in the report or should I do it in the query? It is taking a long time for this report to calculate and run.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Domain aggregate functions in queries are notorious performance killers, but having one in the detail section of the report may not help much. You can try using the Running Sum property of a textbox and see if it works for you.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. How do I create a running total
    By dniezby in forum Access
    Replies: 5
    Last Post: 04-13-2013, 11:42 AM
  2. Total divided by weekdays in a month
    By normie in forum Access
    Replies: 1
    Last Post: 03-22-2012, 07:09 PM
  3. Running Total (Cumulative)
    By jamesborne in forum Queries
    Replies: 3
    Last Post: 12-26-2011, 09:30 PM
  4. Running total
    By lololthis in forum Queries
    Replies: 5
    Last Post: 06-21-2011, 04:14 PM
  5. Total no of days in a month
    By wasim_sono in forum Forms
    Replies: 4
    Last Post: 10-15-2006, 01:05 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