Results 1 to 2 of 2
  1. #1
    smg is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    121

    group by max value

    Hello,
    I have the following query results. From here I need is to add up all the charge hours and group them by employee by the sched with the highest timesheet date so in this case the result would be EE1, FRITHUR, 58.2 hours. I'm struggling with how to do that without losing the hours for the SATFRI sched. Thanks
    EE SCHED TimesheetDate FY Year Period SubPeriod Charge Hours
    1 FRITHUR 2/19/2021 2021 5 3 0
    1 FRITHUR 2/19/2021 2021 5 3 0
    1 SATFRI 1/29/2021 2021 5 3 3.2
    1 SATFRI 1/29/2021 2021 5 3 4
    1 SATFRI 1/29/2021 2021 5 3 0
    1 FRITHUR 2/19/2021 2021 5 3 0
    1 FRITHUR 2/19/2021 2021 5 3 15
    1 FRITHUR 2/19/2021 2021 5 3 28
    1 FRITHUR 2/19/2021 2021 5 3 0
    1 SATFRI 1/29/2021 2021 5 3 0
    1 FRITHUR 2/19/2021 2021 5 3 0
    1 FRITHUR 2/19/2021 2021 5 3 8
    1 FRITHUR 2/19/2021 2021 5 3 4
    1 SATFRI 1/29/2021 2021 5 3 -4


  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Create a query that groups by EE and gets you Max(TimesheetDate). In another totals query group by EE, Sum(ChargeHours) and join the previous one by EE and bring in the SCHED.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 2
    Last Post: 02-20-2019, 10:45 PM
  2. Replies: 2
    Last Post: 11-26-2016, 01:07 PM
  3. Replies: 6
    Last Post: 06-09-2015, 09:51 AM
  4. Replies: 3
    Last Post: 04-28-2015, 02:16 AM
  5. Replies: 0
    Last Post: 02-25-2013, 04:43 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