Count unique values in one column conditional on another column's value

Hi–hoping for some guidance on calculating summary statistics for my tables. Specifically, counting unique values in one column conditional on another column’s value.

Example table:

Columns:
Company | City | Test1 | Test2

Data:
Aardvark | Chicago | Pass | Fail
Caterpillar | Boston | Fail | Pass
Snake | Boston | Pass | Pass
Caterpillar | Boston | Fail | Fail

In a separate single row table, in a single column, I want to count the number of unique companies in Boston that passed test 1.

This formula should count the number of unique values in the first column, based upon certain conditions in other columns.

Appreciate any help!

Hey there! Hopefully this document below can help you out! Take a look at the options, explanations, and then head into the actual calculation columns to see the formulas I used to get the target data

Best of luck and reach out if you need anymore help!

1 Like

Thanks Scott! This is great.

1 Like