Results 1 to 4 of 4
  1. #1
    boutwater is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    6

    grouping and counting

    Hello, I have a table that has an ID, customer, Date, OrderNum, and partSKU. I would like to report on how many times sku x is in the same order as sku y for each sku in the table. I'm not sure how to do this. An order could just be one line (so the above request would not be evaluated), or an order could be multiple lines. Please let me know if you need more info to answer. Thanks,



    Ben

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,951
    The criteria for record selection would be:
    partSKU="x" And partSKU = "y"

    Then construct a field with expression:
    SKUx: IIF(partSKU="x", 1, 0)

    Now use this query as the RecordSource for a report and you can show detail records as well as Sum total of the SKUx 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
    boutwater is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    6
    The partSKU isn't literally "x" ad "y", but could be any value. The table I'm working with has 2 million records, so I wouldn't want to figure out what each possible SKU is and do this manually. Maybe I'm reading your answer incorrectly, but I would want to know how to tell all the unique pairs of SKU's and then from there how to get the number of orders these unique pairs show up in.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,951
    I thought you were interested in only two particular values. I have no idea how to approach your requirement.
    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: 1
    Last Post: 06-09-2011, 09:15 AM
  2. Replies: 4
    Last Post: 04-09-2011, 10:39 AM
  3. Counting
    By rfs in forum Forms
    Replies: 0
    Last Post: 03-15-2011, 03:20 PM
  4. Grouping
    By dref in forum Reports
    Replies: 1
    Last Post: 01-16-2010, 08:30 AM
  5. Replies: 9
    Last Post: 01-31-2006, 08:35 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