简体   繁体   English

在Excel 2013数据透视表中计算每月的平均销售额

[英]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. 您可能会看到,一个特定的订单可以分为多行-订单ID,订单日期和订单总数在每一行都相同。 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. 例如,2012年9月的总销售额为1000美元,2013年9月为500美元。 The average sale for september would be 1000 + 500 / 2 = $750. 9月的平均销售额为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). 我所坚持的是与总计(2013年9月与2013年和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. 使用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. 如果我假设您列出的列是第1行的标题,并且数据从第2行开始,则在单元格H2中添加标题为Real order total的列,其公式为=if(A2=A1,"",G2) 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. 然后将平均值或数据透视表基于H列而不是G列。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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