# Dashboard filters

> Add date range, dropdown, search and number filters to a dashboard, connect them to charts, and compare each chart with an earlier period.

Source: https://orcabase.co/docs/dashboards/filters

**Filters** let anyone looking at a dashboard narrow its charts: a date range, a plan, a country, an amount. Each filter is connected to the charts it should narrow. Change its value and exactly those charts run again, filtered. A chart can also compare its numbers with an earlier period, like “sign-ups +10% vs the previous period”.

## Add a filter

1. **Open the filter editor**

   On the dashboard, open the **⋮** menu and click **Add filter**. Once the dashboard has filters, the same item reads **Edit filters**.

2. **Pick a type**

   In **Dashboard filters**, click **Add filter** and choose **Date range**, **Dropdown**, **Text search** or **Number range**. Give it a **Label**, like “Order date” or “Plan”.

3. **Set a default, if you want one**

   The **Default value** is what everyone starts with, like *Last 30 days*. Leave it empty and viewers start unfiltered.

4. **Connect it to charts**

   Under **Connected charts**, pick for each chart how the filter reaches it (see [Connect charts](https://orcabase.co/docs/dashboards/filters#connect)). Charts left on **Not connected** ignore the filter.

5. **Save**

   Click **Save filters**. The filters appear at the top of the dashboard, next to **Share**. Reorder them with the arrows next to each filter in the editor, or remove one with **Remove filter**.

## Filter types

| Type | What viewers pick | How it narrows a chart |
| --- | --- | --- |
| Date range | A preset like “Last 30 days”, or a custom range | Rows from the first day to the last, both included |
| Dropdown | One value, or several with Allow several values | Rows with any of the picked values |
| Text search | Some text | Rows whose value contains it, ignoring case |
| Number range | A minimum, a maximum, or both | Rows between them, both included |

### Date range

The presets are **Today**, **Yesterday**, **Last 7 days**, **Last 14 days**, **Last 30 days**, **Last 90 days**, **Last 365 days**, and **This** or **Last** week, month, quarter and year. Or pick a **Custom range**: both days are included, and you can leave one end empty for an open range.

- Weeks start on Monday.
- “Last 7 days” includes today.
- Days follow your workspace’s time zone, so “Today” starts at midnight where your team is. See [Time zone](https://orcabase.co/docs/workspace/settings#time-zone).

### Dropdown

Under **Choices**, a dropdown takes its list from **Values from the first connected column or field** (up to 500, sorted), or from **A custom list** you type, one choice per line. A dropdown connected only to SQL parameters needs a custom list. Viewers can also type a value that isn’t listed.

## Connect charts

A filter reaches each chart in one of three ways. The picker lists what each chart offers.

| Way | For | What it does |
| --- | --- | --- |
| Column | SQL queries | Filters the query’s result on one of its columns. Any query works unchanged. |
| Parameter | SQL queries | Fills a {{ parameter }} in the SQL, so the filter applies before anything is added up. |
| Field | Metric queries | Filters a field of the metric, like any other metric query filter. |

### By a column

The simplest choice. Orcabase filters the rows your query returns, so it works on any chart whose result still has the column: revenue by day, a table of orders, a bar per plan. The picker lists the result’s columns, best matches first. Run the query once so its columns show up.

It can’t filter what the query has already added up. A Number showing total revenue has no date column left, so a date range can’t narrow it by column. Use a parameter for that.

### By a parameter

Put [parameters](https://orcabase.co/docs/queries#parameters) in the SQL where the filter should apply, each inside `[[ … ]]`. The part in double brackets is dropped when its parameter is empty, so the query still runs when the filter is cleared:

```sql
SELECT count(*) AS orders
FROM orders
WHERE true
  [[AND created_at >= {{ d_start }}]]
  [[AND created_at <  {{ d_end }}]]
  [[AND plan = {{ plan }}]]
```

| Filter type | Fills |
| --- | --- |
| Date range | `{{ name_start }}`, the first day, and `{{ name_end }}`, the day *after* the last, as `YYYY-MM-DD`. Compare with `>=` and `<`. |
| Number range | `{{ name_min }}` and `{{ name_max }}` |
| Dropdown | `{{ name }}`, with several values separated by commas |
| Text search | `{{ name }}` |

In the picker, `{{ d_start }}` and `{{ d_end }}` show as one choice. On BigQuery, parameters arrive as text: cast them, like `TIMESTAMP({{ d_start }})`.

### By a field

A chart built from a [metric query](https://orcabase.co/docs/metric-queries) lists the metric’s fields. The filter is added to the metric query, so it applies before anything is added up, like a filter you set on the metric.

### Dates stored as numbers or text

When a date range is connected by column, a format picker sits next to the column. **Detect automatically** reads the query’s latest result and usually gets it right. Pick the format yourself when the query hasn’t run yet, or the guess is wrong:

| Date format | Looks like |
| --- | --- |
| Date or timestamp | 2026-01-31, 2026-01-31T10:00:00Z |
| Date key (YYYYMMDD) | 20260131, as a number or text |
| Unix seconds | 1769817600 |
| Unix milliseconds | 1769817600000 |
| Year | 2026 |
| Month (YYYY-MM) | 2026-08 |

Columns that hold plain numbers or text, like `net_revenue` or `plan`, can’t take a date range: the picker greys them out.

### Connecting many charts quickly

- A new date range connects itself to every chart with exactly one date column (or one time field).
- **Connect N more** connects the remaining charts that have a column with the same name as one already connected.
- A chart whose result has no date column shows a hint with the SQL to add, so a total can still be filtered by date.

## Using filters

- A change applies at once. Only the charts connected to that filter run again; each keeps its old result, dimmed, until the new one arrives.
- A filtered chart shows a **filter icon** in its header. Hover over it to see which filters narrow it.
- **Reset** puts every filter back to its default.
- Filter values live in the page address, like `?order_date=last_7_days&plan=pro`. Copy the address to send a teammate the same filtered view; it survives a reload too.
- Filtered results are one person’s view and aren’t saved: each query’s saved result stays unfiltered, and **Run all queries** and the [refresh schedule](https://orcabase.co/docs/dashboards#schedule) run the queries unfiltered. With no filter values set, the dashboard runs nothing and shows the saved results.
- The [chat panel](https://orcabase.co/docs/agent#ask-about-a-page) sees the filters you’ve set, and reads the charts as filtered. It can’t change the filters for you.

> **Note: When a chart can’t use a filter**
>
> If a filter is connected in a way the chart can’t use, like a date range on a column that holds amounts, the chart shows its result without that filter instead of failing. A muted **filter-off icon** appears in its header: hover over it to see *Not filtered — showing the total*, and why. Connect the chart to another column, a parameter, or a date format that fits.

## Compare with an earlier period

A chart can show its numbers against an earlier period: the change on a Number, a dashed line for last month on a Line chart. It’s a chart setting, so it works on any dashboard where a date range filter narrows the chart.

1. **Add a date range filter**

   Connect it to the chart. Without a date range there’s nothing to compare, and the chart draws as usual.

2. **Turn on Compare with**

   Open the chart’s **Chart settings**. On the **Display** tab, set **Compare with** to **Previous period** or **Last year**.

3. **Say which way is good**

   Set **A change is good when it** to **Goes up** or **Goes down**. Good changes are green. Use **Goes down** for churn, cost or response time.

| Date range | Previous period | Last year |
| --- | --- | --- |
| Last N days, Today, Yesterday, a custom range | The same number of days just before | The same days a year earlier |
| This or last week, month, quarter, year | The calendar period before: this month against last month | The same days a year earlier |

A range that reaches past today is compared to date. “This month” on October 8 compares October 1–8 with September 1–8, not with all of September. The chart names the period it compares with, like “vs previous period (Sep 25 – Oct 1, 2026)”.

| Chart | Shows the earlier period as |
| --- | --- |
| Number, Progress, Gauge | The change, like “↗ +10.0% vs previous period”, with the earlier value on hover |
| Line, Area | A dashed line, lined up day 1 to day 1, with both values in the tooltip |
| Column, Bar, Combo | Faint bars beside each bar |
| Pie, Donut | Each slice’s change, in the legend and tooltip |
| Table | Each number’s change, against the matching earlier row |

Stacked charts, Scatter, Radar, Funnel, Treemap and Heatmap don’t draw a comparison. On a Number, a period comparison replaces **Compare with previous row**.

## Filters on shared dashboards

A dashboard’s [public link](https://orcabase.co/docs/dashboards/sharing) gets the same filters, comparisons included. Viewers choose values, and the dashboard’s queries run with them. They never see your SQL or which columns a filter uses.

## Limits

- Up to 20 filters on a dashboard, and up to 500 choices in a dropdown. See [Limits](https://orcabase.co/docs/limits).
- Clicking a bar or a slice doesn’t filter the rest of the dashboard.
- One dropdown’s choices don’t narrow another’s.
- Filters apply only on the dashboard page. The agent’s tools and scheduled refreshes run queries unfiltered.

---

Previous: [Dashboards](https://orcabase.co/docs/dashboards.md) · Next: [Share a dashboard](https://orcabase.co/docs/dashboards/sharing.md)

All docs: https://orcabase.co/llms.txt
