All Collections
Connected Sheets
Referencing a cell in a query
Referencing a cell in a query

How to set up query toggles from cells

Abbey Lauren Minondo avatar
Written by Abbey Lauren Minondo
Updated over a week ago

You'll need to get started by setting up a live datasource connection to a workbook (more on that here). Once you have a connection set up, you can refer to cells in your workbook to filter your data pulls (queries) by inputs into those cells. Note: you'll need to use the SQL editor in order to unlock this functionality.

Here's how it works: get started by writing a query that pulls from a datasource. Below, we're going to pull data from our stripe_charges table.

Next, we'll want to set up the condition that we'll use for our reference. In this case, we have a WHERE statement that we want to use to slice the charges data by plan type. Clicking on the first icon in the toolbar will allow us to reference a cell in our query.

Once we do this, if we type into the referenced cell (G2) and click 'Run Query', the results of our query will be filtered by the plan type we specify in G2 (ex: 'pro').

Did this answer your question?