Table Lookups & Filters
Lookups and filters are powerful techniques for accessing specific data within tables.
Table Lookups
Syntax
lookup(Table, Table Column Condition)
Table
: Specifies the target table.Table Column Condition
: Defines the search condition.
The lookup()
formula allows you to access rows and values from a table for inspection or reuse.
▶

1
To select a specific value from a table using the lookup()
formula, follow these steps:
- 1.Lookup a table Row that matches a condition:
- Set the table name as the first parameter (e.g.,
Expenses
). - Specify the condition to match the table column as the second parameter (e.g.,
Expenses.Item == "Rent"
). - Here is how it should look like:
lookup(Expenses, Expenses.Item == "Rent")
- Set the table name as the first parameter (e.g.,
- 2.Optional: Selecting the column:
- Append a dot (
.
) after thelookup()
formula. - Specify the column name to select the desired value (e.g.,
.Amount
). - Here is how it should look like:
lookup(Expenses, Expenses.Item == "Rent").Amount
- Append a dot (
Table Filtering
Syntax
filter(Table, Table Column Condition)
Table
: Refers to the target table.Table Column Condition
: Defines the filtering condition.
The filter()
formula enables you to extract specific rows from a table based on specified conditions.
▶

1
To filter values from a table using the filter()
formula, use the following steps:
- 1.Specify the table name as the first parameter (e.g.,
Expenses
). - 2.Define the filtering condition as the second parameter (e.g.,
Expense.Amount <= $500
).
The resulting table will contain only the rows that match the specified condition.