In the sample data provided there are multiple line entries per day as well as multiple days per week. The sum
subtotals in an Excel pivot table are calculate as expected, with the correct sales totals per week (the line entries sum up to total sales for a day and the daily totals sum up correctly to weekly totals).
However, when trying to calculate the average
sales per day (in each week), the average sales per line entry is give. Is there any way to calculate the average sale value per day, instead of calculating the average sales value per line entry in every week?
That is, I would like the values in the first subtotal row to be (9+10)/2; (40+35)/2 and (28+24)/2; and in the second subtotal row to be (11+11+10)/3; (30+25+25)/3; and (24+19+20)/3.
The data:
Date,Week,Quantity,Sale Value,Purchase Value
2013/01/02,Week 1,1,10,8
2013/01/03,Week 1,2,20,12
2013/01/02,Week 1,4,10,8
2013/01/02,Week 1,4,20,12
2013/01/03,Week 1,8,15,12
2013/01/06,Week 2,5,20,15
2013/01/07,Week 2,4,15,10
2013/01/08,Week 2,5,10,8
2013/01/06,Week 2,6,10,9
2013/01/07,Week 2,7,10,9
2013/01/08,Week 2,5,15,12
IF
conditions and/orAVERAGEIF
COUNTIF
would work withoutPIVOT
. – zx8754