Query Running Sum with no Values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vasago
    New Member
    • Mar 2014
    • 46

    Query Running Sum with no Values

    I have a query that I am trying to get my employees weekly hours running sum. That way I can seperate the overtime hours and properly calculate profits. I am using a dsum() to add employee time if it is the same week number.

    I am not getting any results for Running total.

    Code:
    Running Total: DSum("[time]","Profit Breakdown 1","[Week] = " & [week number] & " And  DatePart('d', [Date]) <= " & [ddate] & "")
    Code:
    Week number: Format([date],"ww")
    Code:
    Week: Format([Date],"ww")
    Code:
    ddate: DatePart('d',[date])
    I am modeling this from this example:
    Last edited by zmbd; Apr 30 '14, 03:56 PM. Reason: [z{placed required URL tags}]
  • Vasago
    New Member
    • Mar 2014
    • 46

    #2
    Update:

    I was able to get it to calculate correct with this

    Code:
    Running Total: (DSum("[time]","Profit Breakdown 1","[Week] = " & [week number] & " And  DatePart('d', [Date]) <= " & [ddate] & " And [Employee]='" & [Employee1] & "'")/60)
    But it only Calculating it for about 1/2 of the entries. I double checked the empty ones to make sure [Employee] and [Employee1], and dates match. The all look ok but still having issues.

    Comment

    • Vasago
      New Member
      • Mar 2014
      • 46

      #3
      I have found the issue. I need to run Dsum in a new Query.

      Comment

      Working...