What is the Filter formula?
The Filter formula allows you to tell Coda exactly what part of your tables you want to work with. You can use this formula in tables and directly in the canvas using named formulas.
Here's our formulas page breakdown on Filter() for reference: https://coda.io/formulas#Filter. A Filter formula takes two inputs, a list of values (typically table rows, column values or a list from another formula output) and an expression, or a series of arguments, used to evaluate that list.
Let's see how a Filter formula looks in action:
Calculate the number of produce items with a canvas formula:
In this example, the list we're processing is the list of rows from the Groceries table and the expression we're evaluating is whether the Department column contains the word "Produce".
What if we want to create a list of these items?
Once the Filter() formula outputs a list of rows that contain "Produce" as their Department value, we'll call the Item column to output a list of Text values instead, then the BulletedList() formula to convert that list of text into a bulleted list.
🌟 Coda Tips 🌟
Connecting tables with the Filter formula
You can also connect table data together using a combination of the Filter and thisRow formulas. This common pattern is also known as a linked relation, and you can read all about it here.