# Pivot Table not using COUNT function correctly

**URL:** <https://community.spicecrm.io/t/pivot-table-not-using-count-function-correctly/350>\
**Category:** KReporter\
**Created:** [October 11, 2018, 6:31pm UTC](https://community.spicecrm.io/t/pivot-table-not-using-count-function-correctly/350 "2018-10-11T18:31:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tessupport](https://avatars.discourse-cdn.com/v4/letter/t/b2d939/32.png) [@tessupport](https://community.spicecrm.io/u/tessupport)\
**Post date:** [October 11, 2018, 6:31pm UTC](https://community.spicecrm.io/t/pivot-table-not-using-count-function-correctly/350/1 "2018-10-11T18:31:26Z")

</div>

Trying to make a Pivot table to display Customers as rows and open support cases by release version as columns. Tried to use COUNT function in present to populate the pivot chart (e.g. Customer A has 3 cases of version x and 4 cases of version y, total 7 cases). Pivot table is instead pulling case numbers and summing those (Case #'s 100,101 and 103 should total 3 cases, instead totals to 304). If I also try to use COUNT in Manipulate tab, only 1 customer and one release version shows up in pivot table, still with Case # as variable data. I can upload screenshots of manipulate/present tabs if helpful.

Thanks!

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [October 11, 2018, 7:32pm UTC](https://community.spicecrm.io/t/pivot-table-not-using-count-function-correctly/350/2 "2018-10-11T19:32:01Z")

</div>

Screenshots would be helpful indeed. Please, post them.

---

<div class="post-metadata">

**Author:** ![tessupport](https://avatars.discourse-cdn.com/v4/letter/t/b2d939/32.png) [@tessupport](https://community.spicecrm.io/u/tessupport)\
**Post date:** [October 12, 2018, 2:39pm UTC](https://community.spicecrm.io/t/pivot-table-not-using-count-function-correctly/350/3 "2018-10-12T14:39:26Z")

</div>

![image](https://canada1.discourse-cdn.com/flex030/uploads/spicecrm/original/1X/0b573af7256ab9f6557aebf1fe532e618757cad6.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/spicecrm/original/1X/ff7011ec0263cac804b216373dc7f0794f4851bf.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/spicecrm/original/1X/d62ee350f2ddb38da5cf1e274863806897e2af3a.png)

We have about 8 versions of our product, over 700 customers and \> 1,200 cases… so I’m thinking something isn’t quite right

---

<div class="post-metadata">

**Author:** ![tessupport](https://avatars.discourse-cdn.com/v4/letter/t/b2d939/32.png) [@tessupport](https://community.spicecrm.io/u/tessupport)\
**Post date:** [October 12, 2018, 2:57pm UTC](https://community.spicecrm.io/t/pivot-table-not-using-count-function-correctly/350/4 "2018-10-12T14:57:34Z")

</div>

Conversely, when I remove the COUNT function, all customers and versions show up, but instead of a customer having cases 450 and 451 (displaying 2 for 2 cases of version x); it displays and sums those case numbers respectively

---

<div class="post-metadata">

**Author:** ![tessupport](https://avatars.discourse-cdn.com/v4/letter/t/b2d939/32.png) [@tessupport](https://community.spicecrm.io/u/tessupport)\
**Post date:** [October 12, 2018, 8:13pm UTC](https://community.spicecrm.io/t/pivot-table-not-using-count-function-correctly/350/5 "2018-10-12T20:13:11Z")

</div>

Hi Val,

I figured it out. I set the Values argument in the Manipulate Tab to Fixed Value of 1 and Value Type to Display Sum. then ran the argument in Values in Present tab to Count.
