Pivot Table Issues

How to Count Nonblank Values in an Excel PivotTable by Donor

Bushra ParveenBushra Parveen Nov 11, 2026 868 views

Question details

The user wants to count nonblank values, specifically donor year records, within a PivotTable but needs alternatives because standard calculated fields do not support COUNTA.

How to Count Nonblank Values in a PivotTable by Donor
Product
Excel PivotTable
Device & OS
not provided
Scenario
Calculating the total number of distinct or nonblank records per donor in a dataset when standard PivotTable formulas fail.
Observed behavior
The standard PivotTable calculated field fails to execute the COUNTA function correctly, returning errors or inaccurate counts for donor year records.
Before you start

Ensure your raw dataset is formatted as an official Excel Table (Ctrl+T) so that any formulas or PivotTables automatically capture new donor records as they are added.

Solution 1Recommended

Use Microsoft 365 Dynamic Array Formulas

A lightweight and dynamic method to count nonblank or unique values per donor using modern array functions outside the traditional PivotTable.

If your workflow permits calculating the values outside of a strict PivotTable environment, modern Excel dynamic array formulas offer a highly efficient workaround. By combining COUNT, UNIQUE, and FILTER, you can generate accurate donor statistics.

1
Set up your criteria cell

Select a blank cell (for example, A1) and type in the specific donor name you want to evaluate.

2
Apply the formula

Select an adjacent cell and enter the formula: =COUNT(UNIQUE(FILTER(Table1[Year],Table1[Donor]=A1))). Ensure that 'Table1', 'Year', and 'Donor' match your actual table and column names.

3
Press Enter

Hit Enter on your keyboard. The formula will automatically filter the table for the specified donor and count the unique, non-blank year records associated with them.

Use Microsoft 365 Dynamic Array Formulas
Dynamic Updates: This formula approach updates instantly whenever you change the target donor name in cell A1 or modify the source data table.
Advanced Data Analysis

Count Nonblank Values Using WPS Spreadsheet

You can easily summarize your donor records and count nonblank values in WPS Office using its robust PivotTable features. WPS Spreadsheet provides an intuitive interface to manage, analyze, and extract insights from your data seamlessly.

  1. 1. Select your data range: Open your spreadsheet in WPS Office, select your entire donor dataset, and navigate to the 'Insert' tab.
  2. 2. Insert a PivotTable: Click the 'PivotTable' button on the toolbar, choose whether to place it on a new or existing worksheet, and click 'OK'.
  3. 3. Configure row labels: In the PivotTable Field List panel on the right, drag the 'Donor' field into the 'Rows' box to group your records by donor.
  4. 4. Count the records: Drag your target field (e.g., 'Year' or 'Amount') into the 'Values' area. Click the field's dropdown arrow, select 'Value Field Settings', choose 'Count', and click 'OK'.
Fully compatible with Microsoft Excel (.xlsx) files and standard PivotTable structures.Effortlessly change value field settings to 'Count' for instant nonblank record counting without complex formulas.Lightweight, fast to install, and features a familiar tabbed interface for seamless migration.
microsoft office alternative - wps office

Frequently Asked Questions

Why does COUNTA return an error in my PivotTable calculated field?

Standard PivotTable calculated fields are strictly designed to handle mathematical operations (like SUM or AVERAGE) on numeric values. They do not support many standard worksheet functions, including COUNTA or text-based evaluations.

How do I count unique text values in a normal PivotTable?

When initially creating the PivotTable from your data range, check the box that says 'Add this data to the Data Model'. Once created, drag your field into the Values area, access the Value Field Settings, and scroll down to select the 'Distinct Count' aggregation option.

Can I use the UNIQUE and FILTER functions in older versions of Excel?

No, dynamic array functions such as UNIQUE and FILTER are only natively available in Microsoft 365 and Excel 2021 or later. If you are using an older version, you must rely on complex Ctrl+Shift+Enter array formulas or Power Pivot.