简体   繁体   English

使用计算字段时,数据透视表的总计没有给我正确的数量

[英]Grand total for pivot table not giving me the correct amount when using a calculated field

I have a pivot table that I put a calculated field in. the calculation is =IF(fddue_date<finspectData,0,COUNT(fLotSize))我有一个数据透视表,我在其中放置了一个计算字段。计算结果是=IF(fddue_date<finspectData,0,COUNT(fLotSize))

The problem is that instead of getting the expected result of 6 I get 1. Any one have an idea what I am doing wrong?问题是,我得到的不是 6 的预期结果,而是 1。有人知道我做错了什么吗?

Row Labels  Count of fLotSize   Sum of Field1
5/14/2014       
5/12/2014   1                   0
5/14/2014   7                   1
5/15/2014   9                   1
5/16/2014   5                   1
5/19/2014   3                   1
5/30/2014   1                   1
6/9/2014    1                   1
Grand Total 27                  1

it's by the way a known bug since at least Excel 2003. still in 2013 ... 至少从Excel 2003起,它就是一个已知的错误。仍然在2013年...

https://support.microsoft.com/en-us/kb/211470 https://support.microsoft.com/zh-CN/kb/211470

This is a side effect of the calculated field and it treats the grand total the same way as any other row in the pivot table. 这是计算字段的副作用,它与数据透视表中的任何其他行一样对待总计。

If you want to use this type of calculated formula and have a sum shown in the grand total, the best way is to create the formula in the source data table and then pull it into your pivot table as a separate column which will show the correct grand total. 如果要使用这种类型的计算公式并在总计中显示总和,最好的方法是在源数据表中创建公式,然后将其作为单独的列拉到数据透视表中,以显示正确的累计。

快到 2022 年了。 MS 仍未修复。

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

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