Sub Totals in Pivot Tables

monkeyspank

Board Regular
Joined
Feb 12, 2014
Messages
73
I have a series of items that have quantities. Is there away to provide me a count of just the items themselves? For example,



Item Quantity

XXX 5
VVV 7
HHH 1
XXX 5
XXX 10

Well I want to know the number of times ITEM XXX was ordered and the total quantity that was ordered. Can that be done in Pivot Tables?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
38,775
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Yes - put Item in the Row field area, then also into the Value field area. Then add Quantity to the Value area too.
 

monkeyspank

Board Regular
Joined
Feb 12, 2014
Messages
73
What if I know I have order this item three times but I only want to count if the item has ever been ordered? So, I am grouping the total quantity for ITEM XXX which in this case is 20 and I can the item # once. Hope this makes sense.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
38,775
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Only if you have Excel 2013 or PowerPivot. There is no DistinctCount function in regular pivot tables. However you could use a custom number format to display 1 in that field for any non-zero value.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
38,775
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
If you add your data to the Data Model when creating the pivot table (it can't be an .xls format workbook) then you should have the DistincCount option available to you.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,715
Messages
5,833,284
Members
430,201
Latest member
Deepakpilla36

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
Top