Christina K
Christina K

Reputation: 33

Distinct Countifs excluding rows with blank value in a specific column

In the example below I have some data showing customers that were created during the year (in this case it's only July) and the invoices linked to them:

enter image description here

I want to calculate the number of unique customer names that have been created in July and have an invoice linked to them. So distinct count on the Name and exclude the blanks on the Invoice#

I have tried using the formula =COUNTIFS(Table1[Year],I2,Table1[Month],I3), but I need to exclude the rows with the blank Invoice# and count only the distinct names. Any advice?

Thank you in advance

Upvotes: 0

Views: 137

Answers (1)

Harun24hr
Harun24hr

Reputation: 36880

You may try-

=SUM(--(UNIQUE((FILTER($C$2:$C$14,($D$2:$D$14=I$3)*($E$2:$E$14=$I$2)*($A$2:$A$14<>""))))<>""))

enter image description here

Upvotes: 1

Related Questions