Question : get unique/distinct counts for pivot table

Hi, all.
I need to get unique counts for a pivot table and am currently using a FillDown of something like:
=SUM(1/COUNTIF(C:C,C2),0)
(but am actually just using the UsedRange instead of "C:C") and then doing a Sum field in the pivot table.
This works and everything, but can take many, many minutes to calculate.  I think it took about 25 minutes for 40k records on this laptop (which is somewhat old, but still....)

Are there some other/better methods for doing this?

Answer : get unique/distinct counts for pivot table

If I understand you correctly you're happy with the count per order (ie 1234 = 20) but what you're not happy with is the Grand Total saying 167 instead of 4...is this what you want (4)?  If so what I would do, again not being familiar with Pivots, is just put a summary row above your pivot that does a count of column A...I tried this on your spreadsheet and it gave me a result of 4.  You could put some fancy formatting and add the grand total count as well and it would look professional...see attached:

FYI there's a formula in D1 but the font is white to keep it from being visible...you could protect this if need be.
 
Your file with my updates
 
Random Solutions  
 
programming4us programming4us