Count Filtered Column

I’m trying to use a count formula in the canvas to show me the total items in a table (I’m just doing Agents.Name.Count(), with Agents as the table and Name as the column). I also have filters set up based on select lists in the canvas. I’d like for the formula above to count only items not filtered out. So, if I filter based on the select list and my table filters out 150 out of 300 names, I want the count to be 150, not 300.

Any ideas?

Got curious when I read your post, and tested this myself. Came up with this solution, although it may not be as straightforward as would be ideal:

I created a View of the Agents table, then applied a filter to the View table. The Control’s count of the View table then updated in the desired manner.

You are like some kind of Coda guru. This worked great. Thanks!

I’m going to add this to the suggestion box, because having to create a whole separate view is a crazy workaround.

Hey @Joseph_Sorensen,

if you count on the original table, you will always get the total amount( which is a good thing I think).

BUT (as @Joseph_B already said) you can always count() filtered data. And you can do this also in a formula without a view.

=[view of table with filters}.count()
=[original table].filter(YOUR FILTER FORMULA).count()

Just copy/paste your filter formula from the table into the .filter() and you get the filtered count on the canvas :raised_hands:t4:

1 Like

This is super helpful. Thanks!

1 Like