You can make an additional column to store the uniqueness, then sum that up in your pivot table.
What I mean is, cell C1
should always be 1
. Cell C2
should contain the formula =IF(COUNTIF($A$1:$A1,$A2)*COUNTIF($B$1:$B1,$B2)>0,0,1)
. Copy this formula down so cell C3
would contain =IF(COUNTIF($A$1:$A2,$A3)*COUNTIF($B$1:$B2,$B3)>0,0,1)
and so on.
If you have a header cell, you'll want to move these all down a row and your C3
formula should be =IF(COUNTIF($A$2:$A2,$A3)*COUNTIF($B$2:$B2,$B3)>0,0,1)
.