Results 1 to 3 of 3
  1. #1
    ASavage is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    2

    Add and Average customer's monthly data, then Display Top Ten Records

    We have three billing cycles each month (the dates vary from month to month), each comprised of approximately 5000 customers. What I need to do is get the annual average usage for each customer, then display the top ten customers by usage. I've struggled with trying a cross tab query as well as adding the usage from all 12 months for each customer and then averaging it, but don't know how to write it as the day varies from month to month. For instance, in January the cycles may fall on January 4, 22, and 28. Then February they could be February 5, 18, and 27.
    Just to give a "for instance," my fields are: AcctNo, Customer, TransactionDate, Usage.
    Each Customer will have 12 Usage(s) on 12 different TransactionDate(s) (one each month) for the year. I would like to average out their Usage for one year and choose the top ten Customers by usage. Hopefully I've explained myself clearly. Please ask questions if I've been unclear. Thanks to everyone in advance for any suggestions!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    I have a form with date range boxes,to set for a day,or month,or year range.
    txtStartDate, txtEndDate.

    Q1 pulls data in that range:
    select * from table where [date] between forms!myForm!txtStartDate and forms!myForm!txtEndDate

    Q2 calculates the Avg from Q1.
    Q3 combines Q1 & Q2 on the ClientID

    make reports from that.

  3. #3
    ASavage is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    2
    Hrm, ok, I've managed to get all 12 (or however many months that particular customer has been active in that year) of the monthly records for each customer with your suggestion, but then how can I group those 12 to average them in the 2nd query? (Sorry if it's an easy fix, but this really has me stumped.)

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

Similar Threads

  1. Monthly customer debt's query
    By nd0911 in forum Queries
    Replies: 3
    Last Post: 11-29-2017, 09:04 AM
  2. Get average monthly BALANCE
    By aznabeel in forum Access
    Replies: 4
    Last Post: 02-28-2015, 10:08 PM
  3. Replies: 3
    Last Post: 10-30-2014, 06:24 AM
  4. Monthly Sales reports with wholesale average
    By Yarrrm8e in forum Reports
    Replies: 3
    Last Post: 01-31-2014, 04:39 PM
  5. Replies: 5
    Last Post: 11-24-2010, 11:46 PM

Tags for this Thread

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