Grouping

imright

Registered User.
Local time
Today, 03:22
Joined
Jun 27, 2008
Messages
30
I have a database which tracks ontime delivery and rejects by suppliers. What I need to do is be able to group the data from each supplier for a years time so I can find the percentage of on time and percentage of rejects.
I've created a query that when I went to Summary Options it allows me to Sum of days late and Sum of rejects and count of records. I then group by month. I get two or more lines per supplier per month instead of all for one month.
I've attached a small example of what the table looks like so maybe that will help.:eek:
 

Attachments

After reviewing my query that I set up I found a major flaw so my first post was inaccurate. :) I've attached the new query to show what I do have.
What I'm looking to do is create an average of each suppliers quality rating for the past 12 month period and be able to create a new report the next month for the previous 12 months.
Hope that is a better explanation of what I'm trying to do.:confused:
 

Attachments

After reviewing my query that I set up I found a major flaw so my first post was inaccurate. :) I've attached the new query to show what I do have.
What I'm looking to do is create an average of each suppliers quality rating for the past 12 month period and be able to create a new report the next month for the previous 12 months.
Hope that is a better explanation of what I'm trying to do.:confused:

After reading your explanation, and reviewing the spreadsheet, I believe that the simplest form of what you are looking for would be something like the following:

Code:
Select VendorName, Avg(QualityRating)
From VendorInformation
Where RecDate Between Date() and DateAdd("m", -12, Date())
Group By VendorName
Order By VendorName

Of course, Modifications to the "Select", "Group By", and "Order By" statements may be required to display other fields.
 
Thank you for your reply. I'm really not a strong Access user so forgive my ignorance. You told me to put in some code but I'm not sure where. In the Query under VendorName? Does it go in the properties or do I build the code?
Thanks again.
 

Users who are viewing this thread

Back
Top Bottom