The Filters panel on the Results page has two modes. Basic mode lets you build a filter by clicking traits, variables, and answer choices. Advanced mode lets you write the same filter — and more complex ones — directly as an aytm Logic expression.
Use Advanced mode when you need something Basic mode can't express: OR across different questions or rows, parenthesis grouping, like matching, or negation. (Within a single row, Basic mode already uses OR — selecting several answers on a multi-choice question, or several values in a trait row, joins them with OR automatically. AND is applied between rows.)
In This Article
- Starting from Basic Mode
- Writing Logic in Advanced Mode
- Returning to Basic Mode
- Validation and Button States
Starting from Basic Mode
Most filters start here, and it's usually the easiest way into Advanced mode too: set up some parameters with checkboxes first, then switch over and edit the generated logic. Switching from Basic to Advanced is lossless — your existing selections carry over as an aytm Logic expression.
- On the Results page, open the Filters tab.
- Click the checkboxes on traits or variables, and use the 3-state checkboxes on answer choices (include, exclude, or neutral) to build a base for your filter.
- Click the mode toggle to switch to Advanced and view the generated logic. The toggle displays the mode you are currently in — it reads Basic, and clicking it switches you to Advanced. Once switched, it reads Advanced.
- Edit the expression as needed, then click Apply filters to reload your data set.
💡 Tip: Before you switch, hover over the toggle. If you have selections in place, a tooltip previews your current filter as an aytm Logic expression.
⚠️ Note: Advanced mode is available on plans that include advanced filters. If your plan doesn't include it, the mode toggle isn't shown.
Writing Logic in Advanced Mode
You can also build a filter entirely from scratch.
- On the Results page, open the Filters tab.
- Click the mode toggle to switch to Advanced.
- Type or paste your logic into the Custom filters text field.
- Click Apply filters to reload the filtered data set.
⚠️ Note: Write standard aytm Logic expressions without square brackets. If you copy an expression out of the survey editor, remove the brackets before pasting it here.
In the example below, the study is filtered by aytm's preset age ranges so the Results page shows only respondents in the selected buckets. Use the variable age_range in, followed by the buckets you want. The preset buckets are 13-17, 18-24, 25-34, 35-44, 45-54, 55-64, and 65+. To filter to the three youngest:
age_range in '13-17', '18-24', '25-34'
💡 Tip: Press Ctrl+[ in the Advanced editor to toggle suggestions.
Returning to Basic Mode
You can switch back to Basic mode only if your expression is something Basic mode can represent. Expressions that use nested or grouped OR logic, like, or != '' have no Basic equivalent. In that case the toggle becomes non-clickable and relabels to Simplify / clear logic.
Note that the rows of traits, answers, and variables stay visible while you're in Advanced mode — they're simply disabled.
Validation and Button States
As in the survey editor, the system flags logic strings that aren't valid. Validation warnings and errors appear after the editor loses focus. The clearest signals are the token coloring in the text field and whether Apply filters is enabled.
| Stripe color | What it means |
|---|---|
| Grey | Idle — including a valid expression that isn't focused. |
| Teal | Focused or hovered, regardless of whether the logic is valid. |
| Orange | Warning — a missing reference or cluster issue. Apply filters stays enabled. |
| Red | Parse error. Apply filters is disabled and the invalid token is highlighted. |
| Button label | When it appears |
|---|---|
| Apply filters | You have a valid filter staged and ready to run. |
| Clear filters | The staged filter state is empty. |
| Release filters | Filters are currently applied and can be removed. |
| No filters applied | Nothing is staged or applied — button is disabled. |