How to effectively use COUNTIF with multiselect column?
I'm trying to count each unique value selected in any given row of the column, however, the selected cell is coming back as one long string.
How do I count only the unique values, programmatically? I'm using the formulas shared for creating a list of distinct values given any column, if that helps (I can't remember where that post went to).
In my example, line 12 is "New Chair Install" and "Tickets". However, it's clearly coming through as just the one string as I mentioned earlier. Line 11 is "Remote Work" and "Tickets", but still a single string. I want them to be their own respective unique values. That's what I'm trying to solve.
Best Answer
-
Are you pulling them from a multi-select dropdown? If so, there is a line break in between. You would need to substitute those out with commas when bringing it over.
=SUBSTITUTE(JOIN(DISTINCT(COLLECT({Visits}, {Visits}, @cell <> "")), ",") + ",", CHAR(10), ",")
Answers
-
-
=JOIN(DISTINCT(COLLECT({Visits}, {Visits}, @cell <> "")), ",") + ","
Looks like a COLLECT function, that is further being parsed down by DISTINCT.
-
Are you pulling them from a multi-select dropdown? If so, there is a line break in between. You would need to substitute those out with commas when bringing it over.
=SUBSTITUTE(JOIN(DISTINCT(COLLECT({Visits}, {Visits}, @cell <> "")), ",") + ",", CHAR(10), ",")
-
That was it! Thank you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.9K Get Help
- 474 Global Discussions
- 207 Use Cases
- 517 Announcements
- 5.5K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 83 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!