Calculating maximums from data sorted by SKU and date
I have data in a form similar to this:
Date;SKU;Production
Date1;SKU1;Production1
Date2;SKU2;Production2
The production field is just a number, the date is a date, and the SKU is a
string.
I need to find the max average production number for each unique SKU that
was produced in a given month. There are numerous SKUs and numerous dates
that they were produced over a range of months. Some example data below:
5/6/06;010102/1;5600
5/7/06;010102/1;4000
6/2/06;010102/1;3000
6/4/06;010102/1;4000
3/2/06;03531/1;400
3/6/06;03531/1;200
4/1/06;03531/1;500
So for this data I would need excel to spit out on a seperate sheet:
010102/1;4800
03531/1;500
4800 is the average production for the month of May for SKU 010102/1 and for
June for SKU 010102/1 the avg production was 3500, but the max production in
a month for that sku was 4800 so that was put on the sheet.
Any help would be greatly appreciated. Thanks.
|