---
title: Advanced Filtering on Reports (Filtering Via Code)
description: "This article shows you the ways to limit which records go into a report: the **Filter** on the Reports page, and data source filters set up by an administrator. > **Applies to:** Anyone who can generate the report (Filter), and…"
url: "https://support.symbiant.co.uk/kb/advanced-filtering-on-reports/"
updated: "2026-10-30"
category: Reporting Suite Tutorial
tags:
  - Excel
  - Reports
  - Spreadsheets
  - Updating
  - Word
---

# Advanced Filtering on Reports (Filtering Via Code)

This article shows you the ways to limit which records go into a report: the **Filter** on the Reports page, and data source filters set up by an administrator.

> **Applies to:** Anyone who can generate the report (Filter), and system administrators (`admin` role) for data source filters.

## Filtering When You Generate

1. Click **Reports** at the bottom of the menu on the left.
   ![Reports in the main menu](https://support.symbiant.co.uk/wp-content/uploads/2026/10/rp-front-nav-d62952.png)
2. Find the report and click **Filter**.
   ![Filter next to Generate](https://support.symbiant.co.uk/wp-content/uploads/2026/10/rp-front-filterlink-57718f.png)
3. Click **AND** and pick the field to filter on, for example **Level**, then set the condition and value. Add more conditions with **AND** or **OR**. This works like the record filters elsewhere in Symbiant.
   ![Choosing a field to filter on](https://support.symbiant.co.uk/wp-content/uploads/2026/10/rp-front-filter-ade592.png)
4. **Database** is normally **Current**.
5. Click **Close**, then **Generate**. Only matching records go into the report.

## Filters Built Into the Report (Administrators)

To make a report always filter its data, an administrator can add a filter to the data source in **Set up > Reports**.

### Make Sure the Fields Are Ticked

A filter can only use fields the data source pulls. Open the data source with **Graph...** and tick every field you want to filter on, as here for **Level** and its text. For scores, tick the whole score set you're filtering, for example the residual score with its impact, likelihood and score values.

![Ticking fields in the graph](https://support.symbiant.co.uk/wp-content/uploads/2026/10/rp-graph-85561c.png)

### Data Source Functions

Click **Functions** next to the data source. **Where Filter**, **Attribute Filter** and **Time Filter** limit the data; tick one and click its **Configure...**.

![The Functions list](https://support.symbiant.co.uk/wp-content/uploads/2026/10/rp-functions-90521f.png)

### Data Source Filter Template

Tick **Data source filter template** to open a box where the filter is written as code, using the same markers as the template. The code compares a value from the data source with what you want, for example only risks whose residual score (`risk.residual/score` and its `product`) is 8 or more.

![The data source filter template box](https://support.symbiant.co.uk/wp-content/uploads/2026/10/rp-filter-tpl-1435a7.png)

The code starts with the data source name followed by square brackets. For example, the shipped **Risks By Register (Overview)** report has `data[$ << :generic.sort/index]` in its filter template.

> **Note:** The filter code must match your data source exactly. If you'd like a coded filter written or checked, contact Symbiant Support with the report name and the rule you need.

Click **Save** at the top right when you're done, then generate the report to check the results.

## Related articles

- [Advanced Report Syntax](https://support.symbiant.co.uk/kb/advanced-report-syntax/)
- [Reporting Permissions](https://support.symbiant.co.uk/kb/reporting-permissions/)
