COUNT DISTINCT COLLECT returning 1

Options
Tarek A
Tarek A
edited 03/31/23 in Formulas and Functions

The following formula is returning 1

We are looking to count distinct number of customers for each site based on data from another sheet (as a customer may have multiple projects with us)

These are the headers of interest in the sheet with all the raw data. The "Site" column a multi-pick column so we set up a "Site helper" column using the following formula =SUBSTITUTE(Site@row, CHAR(10), ",") to allow unique counting

This is the formula created to count the number of distinct customer per site.

=COUNT(DISTINCT(COLLECT({Customer Name PP}, {PP Site}, CONTAINS("Site 1", {PP Site}))))

Note: {PP Site} references the Site Helper column but have no idea why it names itself {PP Site} instead of {PP Site Helper}

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!