Results 1 to 4 of 4
  1. #1
    usaemtp is offline Novice
    Windows 8 Access 2013
    Join Date
    Dec 2015
    Posts
    10

    Querying an Access 2013 Multivalue field to obtain totals of each value in a date range


    I have searched for the answer to this question on the internet and have not found one that fits exactly what I am trying to do so I do not know if it is even possible. But I have a table that tracks incidents for work with a multi-value field called "Event Type." I want a query to pull data for the previous 12 months and to total each value selected from the multi-value field. I have created a query and pulled the "Date" field and the "Event Type" field to the query column window. I have the criteria that will select the previous 12 months from the Date column so that the query will use only that data. But I do not know what criteria to enter in order to total each event type selected in the "Event Type" field so that I can have a count of the 9 different event types that occurred over the past 12 months. Does anyone have any suggestions on how I can accomplish this? I would appreciate any help you can provide.


    Brian

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Need to do an aggregate (GROUP BY) Totals query or build a report that uses Sorting & Grouping features with aggregate calcs in group and report footer sections.

    Do you need the data summarized by event type and month? Use an expression to create a field that extracts the year and month from the date value. Use that calculated field for grouping criteria.

    I NEVER use multi-value field.
    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
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    you need to put the eventtype.value into the query, not the eventtype

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Review https://support.office.com/en-us/art...3-B6624E1E323A

    One expression to extract year and date: Format([date field], "yyyymm")
    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: 2
    Last Post: 01-08-2015, 12:41 AM
  2. Replies: 7
    Last Post: 12-04-2014, 12:47 PM
  3. Replies: 2
    Last Post: 11-23-2014, 08:14 AM
  4. Replies: 43
    Last Post: 08-06-2014, 08:21 PM
  5. Replies: 15
    Last Post: 05-24-2012, 02:36 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