Creating Calculated Field with SUM and COUNT of Fields Pivot Table

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 10:44:50

问题


Here's a snapshot of my pivot table.

I want to create a calculated field that displays the percentage from the Responded column (C) over the Ticket # column (B) as in column G.

The Ticket # column is a column of value text strings (e.g. 413456, 464313) and the Responded column is a list of 1's and 0's. In my pivot table I am taking the count of all Ticket # and the sum of the Responded.

I tried to create a calculated field with the following formula

=Responded/COUNT('Ticket #')

but this gave me the same as Sum of Responded. How can I create a calculated field that gives me the % in column G?


回答1:


From my experience and what another SO member posted, COUNT doesn't seem to work well in pivot table field calculations. I managed to count the distinct tickets by creating a helper column of 1's and 0's in my data source. (Thanks to this response from Siddarth Rout.)

Once you have 1's associated with each distinct tickets, I simply created the calculated with Responded/Ticket #.



来源:https://stackoverflow.com/questions/38361835/creating-calculated-field-with-sum-and-count-of-fields-pivot-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!