Count(Distinct(Collect Formula

I am trying to write a formula to return a count of the number of unique IDs market propject and then counted by market. From what I have been reading it seems like a count(distinct(collect formula is needed. Also, I might need a helper column on my source sheet to determine which rows are unique.
Best Answer
-
Hi @Smar Czar, just so that I understand better, you want to count the number of unique combinations of (ID, Project, Market)?
You can create a helper column named "Key" with the following formula:
=ID@row + "-" + Project@row + "-" + Market@row
This helper column will act as a key that we can use to compare with other keys, to count the number of unique ones.
Then this formula will collect the number of distinct ones:
=COUNT(DISTINCT(Key:Key))
I hope this helps!
Nathan Braun (Founder of SSFeatures) (nathan@ssfeatures.com) (LinkedIn)
SSFeatures makes Smartsheet way easier to use and it saves you hours of work every week. It adds essential features into Smartsheet to save you time. For example: — Auto Sorting — Sorting with Filters — Report PDF Generation — Copy and Paste Conditional Formats — Copy and Paste Automation Workflows — Column Manager — and so many more.
Answers
-
Hi @Smar Czar, just so that I understand better, you want to count the number of unique combinations of (ID, Project, Market)?
You can create a helper column named "Key" with the following formula:
=ID@row + "-" + Project@row + "-" + Market@row
This helper column will act as a key that we can use to compare with other keys, to count the number of unique ones.
Then this formula will collect the number of distinct ones:
=COUNT(DISTINCT(Key:Key))
I hope this helps!
Nathan Braun (Founder of SSFeatures) (nathan@ssfeatures.com) (LinkedIn)
SSFeatures makes Smartsheet way easier to use and it saves you hours of work every week. It adds essential features into Smartsheet to save you time. For example: — Auto Sorting — Sorting with Filters — Report PDF Generation — Copy and Paste Conditional Formats — Copy and Paste Automation Workflows — Column Manager — and so many more.
-
Thank you @SSFeatures ! It worked. Appreciate your help as always.
-
@Smar Czar You're welcome! Glad it worked!
Nathan Braun (Founder of SSFeatures) (nathan@ssfeatures.com) (LinkedIn)
SSFeatures makes Smartsheet way easier to use and it saves you hours of work every week. It adds essential features into Smartsheet to save you time. For example: — Auto Sorting — Sorting with Filters — Report PDF Generation — Copy and Paste Conditional Formats — Copy and Paste Automation Workflows — Column Manager — and so many more.
Help Article Resources
Categories
Check out the Formula Handbook template!