简体   繁体   中英

Calculate the average sale for each month in excel 2013 pivot table

I have a large chunk of sales data with (some columns removed for clarity purposes):

Order Id, Order Date, Product, Amount, Product Price, Row total cost, Order total cost

A specific order can, as you may see, be divided over multiple rows - were order id, order date and order total is the same on each row. The "row total cost" contains the price for a specific amount of a specific product in the order.

It's not the best way to store data - I know...

Any ways. What I would like to do is to calculate the average sales value for each month. For example - total sales in sep 2012 is $1000, and in sep 2013 it's $500. The average sale for september would be 1000 + 500 / 2 = $750.

This I would like to present in a pivot table and pivot chart.

What I'm stuck with is an average sales value compared to the grand total (sep 2013 compared with all month of 2013 and 2012). I believe I need to group or filter my average calculation - but can't figure out how to do that.

Any help is much appreciated. Using Excel 2013.

Is the challenge caused by the "Order Total Cost" column containing repeats, and hence when you get average of that column it is not accurate?

If I assume that the columns you list are headings in row 1 and that data starts in row 2, then add a column headed Real order total with the formula =if(A2=A1,"",G2) in cell H2. Copy that down and it will give the order total just once for each order. Then base your average or pivot table on col H rather than G.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM