PIVOT TABLES: Show correct count value based on different cell values

JayB0730

Board Regular
Joined
Oct 22, 2014
Messages
74
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a pivot table that currently shows the following:

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Column Labels
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]EXPIRED[/TD]
[TD][/TD]
[TD]COMING UP TO EXPIRATION[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Row Labels[/TD]
[TD]Count of Item Code[/TD]
[TD]Sum of Total Value[/TD]
[TD]Count of Item Code[/TD]
[TD]Sum of Total Value[/TD]
[/TR]
[TR]
[TD]Tables[/TD]
[TD]74[/TD]
[TD]$817,008[/TD]
[TD]27[/TD]
[TD]$68,000[/TD]
[/TR]
[TR]
[TD]Chairs[/TD]
[TD]3[/TD]
[TD]$422[/TD]
[TD]19[/TD]
[TD]$900,000[/TD]
[/TR]
[TR]
[TD]Books[/TD]
[TD]18[/TD]
[TD]$254,000[/TD]
[TD]20[/TD]
[TD]$143,291[/TD]
[/TR]
</tbody>[/TABLE]


However, the issue I am having is that I don't want the "COUNT OF ITEM CODES" to include a count where the field in data source, "Quantity on Hand" = 0. While the SUM of Total Value would not be affected by this filter, I would want COUNT OF ITEM CODE to reflect correctly...see below:


[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Column Labels
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]EXPIRED[/TD]
[TD][/TD]
[TD]COMING UP TO EXPIRATION[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Row Labels[/TD]
[TD]Count of Item Code[/TD]
[TD]Sum of Total Value[/TD]
[TD]Count of Item Code[/TD]
[TD]Sum of Total Value[/TD]
[/TR]
[TR]
[TD]Tables[/TD]
[TD]50[/TD]
[TD]$817,008[/TD]
[TD]27[/TD]
[TD]$68,000[/TD]
[/TR]
[TR]
[TD]Chairs[/TD]
[TD]1[/TD]
[TD]$422[/TD]
[TD]16[/TD]
[TD]$900,000[/TD]
[/TR]
[TR]
[TD]Books[/TD]
[TD]17[/TD]
[TD]$254,000[/TD]
[TD]20[/TD]
[TD]$143,291[/TD]
[/TR]
</tbody>[/TABLE]

Any help is greatly appreciated!

Thanks,
Jay
 
Last edited:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
hello, Jay

Seeing the sample source data would help understanding.

I may be on the 'wrong track' but it sounds to me like excluding data with 'Quantity on Hand' = 0 is what you're after.
If so, can you put the 'Quantity on Hand' field as a page field and deselect the quantity 0?

HTH
 
Upvote 0
Hi Fazza,

Wow, I think I had the biggest "brain fart" known to man. Yes, how I completely missed the fact that I could simply throw the Quantity on Hand field into the reports filter section & 'uncheck' 0, is beyond me. Thank you for giving me the virtual "slap on the back of the head". :)

Thank you & take care,
Jay
 
Upvote 0
Just a minor BF, Jay. :) Suggest you double-check the solution does exactly what you want. All the best, Fazza
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top