What is the Filter formula?
The Filter formula allows you to tell Coda exactly what part of your tables you want to work with. Like with all formulas in Coda, you can build it anywhere by typing "=".
After the = sign, you'll type the table name then ".Filter". Note, the "." is critical. Let's take a look at an example:
1. Calculate the number of produce items:
[Groceries]. Filter(Department=Produce).Count( )
2. Calculate the number of produce items with a stock of less than 5:
[Groceries]. Filter(Department=Produce AND Quantity<5).Count( )
3. Create a bulleted list of the produce items with a stock of less than 5:
[Groceries]. Filter(Department=Produce AND Amount<5).BulletedList( )
Connecting tables with the Filter formula
You can also connect table data together using a combination of the Filter and thisRow formulas. For example, maybe I want a summary table that shows the amount of items we have in each grocery department.
To begin, I would create a new table with each department listed in rows. Then, I would change the column format in our core grocery table to be a Lookup:
Then, I can add the following formula to my summary table:
This formula tells Coda to look at the row in the summary table, and filter the other table by that value: