简体   繁体   English

数据透视表,计算字段

[英]pivot Table , calculated field

this is my probleme : 这是我的问题:

资料库

i get from the data base this pivot table : 我从数据库获得此数据透视表: 透视表

i want to insert a row in the end of each groupe tha calculat ( Nombre de responsable for each groupe / total somme type a-month ) . 我想在每个分组的末尾插入一行(对每个分组/每月总somme类型负责)。

for example : for the groupe A in avr : 例如:对于avr中的A组:
( Nombre de responsable for groupe A / total somme type a-month ) = 1/2 = 0.5 (负责A组的总费用/某月的总Somme类型)= 1/2 = 0.5

how can i do this ? 我怎样才能做到这一点 ?

Typically, if you want to add a calculation to your Pivot Table, you would use a Calculated Field. 通常,如果要将计算添加到数据透视表中,则应使用“计算字段”。

As powerful as Pivot Tables are, their Achilles Heel is the inability to use aggregated values other than SUM in their calculated fields. 与数据透视表一样强大,其致命弱点是无法在其计算字段中使用除SUM以外的汇总值。 See this post and this web page . 请参阅此帖子此网页

Of note: 注意:

Limitations 局限性

  • Calculated field formulas cannot refer to the pivot table totals or subtotals 计算的字段公式不能引用数据透视表的总计或小计
  • Calculated field formulas cannot refer to worksheet cells by address or by name. 计算的字段公式不能按地址或名称引用工作表单元格。
  • Sum is the only function available for a calculated field. 求和是唯一可用于计算字段的函数。

If you want to add your calculation to the table, you would need to do it along side, below, or above the table with a formula such as ... 如果要将计算添加到表中,则需要在表的侧面,下方或上方使用诸如...的公式进行计算。

=GETPIVOTDATA("Count of responsible",$A$3,"responsible","A","Months",5)/GETPIVOTDATA("Sum of type a-month",$A$3,"responsible","A","Months",5)

These formulas are easy to construct as you only need to type = into the cell you want the formula then click into the PivotTable to get the reference to the PivotTable GETPIVOTDATA(...) 这些公式很容易构造,因为您只需要在所需公式的单元格中键入= ,然后单击数据透视表即可获得对数据透视表的引用GETPIVOTDATA(...)

Another alternative is to add a column to your original data set and include it in your pivot table. 另一种选择是在原始数据集中添加一列,并将其包括在数据透视表中。

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

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