Inside this article
Filter formulas are a great way to customize your table whether you're creating a new view in a different section, or if you're refining the data in your original table. When you filter in Coda, you can use our simple picker or formulas.
Watch a video about filtering
Filter by one parameter with formulas
Imagine you have a table with cars that tracks their colors and a few other parameters, and you just want to see black cars. To do this you can create a filter using the following steps:
- Hover over your table until the "Filter" option appears and click it.
- In the side panel that appears, click "Add filter" and select "Formula" from the dropdown.
- Enter your formula — in this case it will be pretty simple:
- If you prefer, you can select a different option from the dropdown to use the picker interface.
To remove a filter, click the three dots "kebab" icon next to the filter in the side panel and select "Remove."
Filter by multiple parameters with formulas
What if you want to filter by two parameters, like make and color of car? To do this, you can add the word "AND" to your formula, for example
[Color]="black" AND [Model]="Volkswagen . If you're a recovering programmer, && will also work. Note that if you use a formula to chain multiple logical statements, you'll want to wrap connected ideas using () for the logic to evaluation properly.
You can similarly use the filter pickers to do this manually:
Filter items out of a table with formulas
Formulas also allow us to filter items out of a table. So to see all cars that aren't black, use !="Black" in your formula. If you're new to formulas, != translates to not equal.