简体   繁体   中英

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:

在此处输入图像描述

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

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<>""))))<>""))

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM