GETPIVOTDATA count column when =0

drom

Well-known Member
Joined
Mar 20, 2005
Messages
543
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and Thanks in advance

I have a Pivot Table.
This pt shows 2 columns: Countries and Sales.

Country is a Row field and then I show Count of Sales on the right of Countries.

Now I would like to add GETPIVOTDATA formula and get how many countrie's Sum is equal to zero.

GETPIVOTDATA ("Sales";$a$4;"Sales";0) Does not Work.

Any IDEA???

This eg is just for this query, I have to use a Formula and if possible GETPIVOTDATA
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
In order to use getpivodata() to get info for a particular country, you would need to supply that country's name. Therefore, I expect getpivotdata() is not the way to go here.

What would probably be the easiest is countifs() (post Excel 2003) or sumproduct() (2003 and below). You would need to count the rows where the country column is non-blank and not a total/subtotal and where the sum column is equal to zero.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,947
Latest member
Gerry_F

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