COUNTIF for select list

Hey community :wave: I’m new to Coda and find the app rather complex than powerful (yet). So maybe you can help me out!

I want to track customer exposure, e.g. how many hours has each employee participated in user research. To do this I’m pushing all new Google Calendar events to a Coda doc. Each event means one row.

The attendee’s emails are a comma separated array which I SPLIT in a select list. That select list grabs the values of the employees also from a master table with all employees.

Now I want to do something like COUNTIF over that table with the select list to count each event which contains a given employees name. However, it looks that COUNTIF doesn’t work for select lists. Any idea how I can achieve my outcome?

1 Like

Hi Lars, welcome to the community.

Due to the many ways you can approach a problem, It’s usually good practice to share your doc or a mock up with dummy data of what you’ve tried so far. Or at least describe the formulas you’re using so other members can understand your data flow.

I’d say most of Coda’s complexity is handling the data types. You have to be sure whether you’re referencing a row, a value, a list…

For example for me it’s a bit hard to understand what this part means:

The attendee’s emails are a comma separated array which I SPLIT in a select list. That select list grabs the values of the employees also from a master table with all employees.

Is the Select List a list of emails? A list of row references?

In any case, this may help:

Say you have a [Master Table] with all employees and this table has an [Email] column. You also have an [Events] table with a [Participants] column that is a list of emails of all participants.

In that scenario, you can find out how many events an employee has participated in by adding a column to [Master Table] with this formula:

[Events].Filter(thisRow.Email.in(currentValue.Participants)).Count()