ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting in Pivot Tables w/o "0" (https://www.excelbanter.com/excel-worksheet-functions/240940-counting-pivot-tables-w-o-0-a.html)

Bec

Counting in Pivot Tables w/o "0"
 
I'm trying to add a formula in a pivot table, yet do not want to count "0".
Please help.
bec

Shane Devenshire[_2_]

Counting in Pivot Tables w/o "0"
 
What version of Excel are you using?
What is in the cells - text, numbers, dates?
What is the formula you are using?

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"bec" wrote:

I'm trying to add a formula in a pivot table, yet do not want to count "0".
Please help.
bec


pshepard

Counting in Pivot Tables w/o "0"
 
Hi Bec,

Using the following data for a pivot table:

Room Color
Bathroom blue
Playroom red
Patio green
Den 0
Kitchen yellow

Drag the Room field into the Values area of the pivot table, then drag the
Color field into the Row Labels area of the pivot table.

You should end up with the following:

Row Labels Count of Room
0 1
blue 1
green 1
red 1
yellow 1
Grand Total 5


Method 1

Select the cell with '0', then from the PivotTable Tools/Options/Tools click
on Formulas, then select Calculated Item.

Double click Color from the Fields list, then double click blue from the
Items list - to create the following formula:

= Color blue+ Color green+ Color red+ Color yellow

include all fields to be counted (not able to exclude the one field that
isn't counted)

Result: Formula1 4


Method 2

Filter "0" out.

Drag the field into the Report Filter area of the pivot table, then select
multiple items, then deselect 0. This can be a problem is you are going to
use this pivot table with new data - so check this filter.

Method 3

Add a column to the source data and include the column in the pivot data
source range, with the following formula:

=if(cell=0,0,1)

Sum this column in your pivot table to get a count.

Hope this helps.

Peggy


"bec" wrote:

I'm trying to add a formula in a pivot table, yet do not want to count "0".
Please help.
bec



All times are GMT +1. The time now is 06:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com