How to build a count distinct pivot table in excel to count unique customers
- Step 1Upload transaction data — Upload a file with customer_id, segment, and date columns.
- Step 2Configure COUNT DISTINCT pivot — Row field: Segment. Column field: Month. Value field: customer_id. Aggregation: COUNT DISTINCT.
- Step 3Generate pivot — Each cell shows the number of unique customers in that segment+month combination.
- Step 4Export for reporting — Download the XLSX for inclusion in marketing or customer reports.
Frequently asked questions
How is COUNT DISTINCT calculated?+
The tool collects all values for each row+column bucket and uses a JavaScript Set to count unique values.
Does it handle null/blank customer IDs?+
Blank customer_id values are excluded from the distinct count to avoid counting missing data as a unique customer.
Privacy first
Every JAD Excel tool runs entirely in your browser using SheetJS and ExcelJS. Your spreadsheets, formulas, and data never leave your device — verified by zero outbound network requests during processing.