What am I doing wrong with this formula?

I am trying to figure out how many records in a table have a specific word (e.g “Programmer”) in one column. But the formula always returns 1.

Thank you for any help!

Contains returns just one value: true or false. Hence the count is always 1.

What you need is first split the tags by a comma "," and then use a different formula:

[Table 1].CountIf(Tags.Split(",").Contains(thisRow.[Column 1]))

If you want to search for the substring in a string and NOT split by comma (e.g. to count a row having a tag Software Programmer to also count for Programmer), the formula will be different:

[Table 1].CountIf(Find(thisRow.[Column 1], Tags) != -1)

1 Like

Thank you so much for your help, Paul! This is what I ended up using that seems to work (many roads to Rome?) :slight_smile:

CountIf([Table 1].Tags, ParseCSV(CurrentValue).Contains(ParseCSV(thisRow.[Column 1]).first()))

Parse CSV seems unnecessary, a simple Split(",") would do the job IMO. But okay :slight_smile: