根据列中的项创建excel数据透视表中的计算字段 [英] creating a calculated field in excel pivot table based on an item in a column

查看:664
本文介绍了根据列中的项创建excel数据透视表中的计算字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在excel(2010)中通常计算的数据透视表字段,您点击:
设计选项卡>选项和集合>计算字段

Normally calculated pivot table fields in excel (2010) you click: design tab > options and sets > calculated field

,如果您有三列:名称,销售,成本

and if you had three columns: name, sales, cost

name | sales | cost
josh    10      2    

您的计算字段可能是:利润是:=销售 -

your calculated field might be: profit which would be: = sales - cost.

但是,是否有可能计算出一个周末列中两个项目之间的差异的计算字段?

However is it possible to make a calculated field which calculates the difference between two items in the one "Week Ending" column?

例如周末包含一个在星期五2015-05-01,2015-05-08,2015-05-15等结尾的日期,它们位于枢轴表。

For example "Week ending" contains a dates which end on a friday 2015-05-01,2015-05-08,2015-05-15 etc and they are in the column labels section of the pivot table.

周结束日期都在一列中,仍然可以用计算的字段计算其中两个之间的差异? p>

The "week ending" dates are all in the one column, is it still possible to calculate the difference between two of them with a calculated field?

name | End Fri 2015-05-01 | End Fri 2015-05-08 | calculated (Delta)
josh    8                              10           10-8 = 2


推荐答案

您可以使用计算项目执行此操作。这是一个我认为接近你想要的例子。我选择了其中一个日期,以便显示菜单。

You do this with a Calculated Item. Here is an example that I think gets close to what you want. I selected one of the dates in order to get the menu to show up.

这是结果

这里是一个很好的参考。 http://www.contextures.com/excelpivottablecalculateditem.htm

And here is a good reference about these. http://www.contextures.com/excelpivottablecalculateditem.htm

这篇关于根据列中的项创建excel数据透视表中的计算字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆