# Data Filtering

**URL:** <https://forum.avicennaresearch.com/t/data-filtering/1272>\
**Category:** Reference\
**Created:** [June 16, 2025, 9:19am UTC](https://forum.avicennaresearch.com/t/data-filtering/1272 "2025-06-16T09:19:20Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![mojtaba](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/m/e56c9b/32.png) [@mojtaba](https://forum.avicennaresearch.com/u/mojtaba)\
**Post date:** [June 16, 2025, 9:19am UTC](https://forum.avicennaresearch.com/t/data-filtering/1272/1 "2025-06-16T09:19:20Z")

</div>

Searching within your study’s data is an important part of your research. Avicenna provides you with a powerful filtering tool that you can use to query your data. Currently, this data filtering is available on the following pages:

- Notifications
- Participation
- Audit Trail
- Activity Responses

To access this feature, while you are at one of the above pages, simply click on the `Filter` dropdown, and choose `Manage Filters`.

In the `Manage Filters` dialog, you can see Avicenna’s default data filter. This is the filter that is applied to your data by default. You cannot change this filter, rename it, or delete it. However, you can create a new Filter and apply your conditions to it.

Start by clicking on the `Create New Filter` to create a new one. On the right side, you will see three tabs, `Conditions`, `Sorts`, and `Columns`, as shown in the image below:

 ![Data Filtering Elements](https://forum.avicennaresearch.com/uploads/default/original/1X/7d3d1f05b71e34b08d91fd8902bce06e2a5c2057.png)

You can use these tabs to create the data report specific to your needs. Below, we explain each of these tabs.

## Conditions

A condition defines what data should be included in your search results, based on the selected category, fields, operator, and values. You can add multiple conditions to your filter and even group them together to make your search query more complex. Let’s see what are different parts of a condition, and how you can use them to build your filter.

 ![Main parts of Conditions tab](https://forum.avicennaresearch.com/uploads/default/original/1X/3852e052c656e203190787eb345e6eff8c6258d8.png)

1. **Category:** Category is used to group relevant fields together. Based on the page you are visiting on the Researcher Dashboard, you will see different categories. For example, when you are on the Activity Responses page, you will see a list of categories like _Activity Response_, _Participant_, _Session_, and so on.

2. **Field:** the second drop-down allows you to choose the data field that you want to use in your filter, for example, _Avicenna ID_, _Label_, or _Status_.

3. **Operator:** The operator is self-explanatory, and determines the relationship between your field and the value:

4. **Value:** This is the value you want to use in this filter, and can be either a single- or multi-select list, a text, a number, or a date.

Each condition has a menu on the right side, and a three-line drag-handle next to it. The menu provides the options to delete or duplicate the condition. The drag-handle allows you to rearrange the order of the conditions. This matters if you consider the priority of your conditions.

 ![Delete and Duplicate options](https://forum.avicennaresearch.com/uploads/default/original/1X/2219832139b7c12400087fc83addb77b85ece1b7.png)

### Adding Multiple Conditions and Condition Group

You can have more than one condition in your filter, as shown in the image below:

 ![Adding Multiple Conditions](https://forum.avicennaresearch.com/uploads/default/original/1X/d17c092a20e6327ba1084f5fe8132c45a45ed644.png)

All conditions are either `AND` together or `OR` together. If you want to mix `AND` and `OR` in your query, you will need to group your conditions.

As an example, assume you want to query all active participants in your study for whom either at least one email or at least one SMS notification has failed. In this case, you need to define three filters and group them appropriately, as explained below:

1. Click on **Add Condition** and build the first condition. Then select _Participant_ as Category, _Status_ as Field, _is equal to_ for the Operator, and _Active_ for the Value.
2. Click on **Add Condition Group** and make sure that **And** is selected.
3. Click **Add Condition** inside the new group to build the second condition. For this one, choose _Notification_ for the Category, _Email Status_ for the Field, _is equal to_ for the Operator and _Failed_ for the Value.
4. Click **Add Condition** inside the new group again and build the final
5. condition. Make sure that **Or** is selected. For this one, you need to select _Notification_ for the Category, _SMS Status_ for the Field, _is equal to_ for the Operator and _Failed_ for the Value.
6. Press **Apply**.

 ![Adding Condition Group in the Data Filtering](https://forum.avicennaresearch.com/uploads/default/original/1X/5d2393030881b847312f951febf08ba2f94bd8aa.png)

### Aggregation

In certain cases, you may want to aggregate all values of a field and use that in your filter, rather than using each individual value. For example, you may be interested in the number of completed sessions, or minimum response to a survey question. This can be achieved using the `Aggregate` dropdown for each filter. Avicenna supports the following aggregation options: Count, Distinct Count, Minimum, Maximum, and Average. Each of these options will be explained below.

Please note that the aggregation option is only available if the data you are filtering contains more than one record of the data you are using in your condition. For example, each survey session has only one status. So if you are filtering survey sessions based on status, you cannot use aggregation. But you can send multiple notifications for each session, and therefore each session can have more than one notification. So you can use aggregation when using Notification as a condition in filtering sessions.

As another example, each participant very likely will have more than one survey session. So if you are filtering participants based on their sessions, the system will present you with the aggregation option.

## Sort

You can sort your data based on one or more fields. To choose a field for sorting, in the **Sort** tab, click on **+ Add Sort** , and then choose your field. You can also choose whether the sort should be done in ascending or descending order.

 ![Adding a Sort](https://forum.avicennaresearch.com/uploads/default/original/1X/53c27eacbf062e6641ec7ae73057fdc12cd63fb5.png)

You can also use the `X` icon to remove a field from sorting. You can rearrange the fields you have chosen for sorting by dragging the two-line icon on the right side of each field. You can also use the `Delete All Sorts` option to remove all sorting criteria you had specified.

 ![Using multiple Sorts](https://forum.avicennaresearch.com/uploads/default/original/1X/f45c57d4d155e7812c9c3c2465604ae06b106dc5.png)

## Columns

The `Columns` tab lets you customize and choose which columns of the data should be retrieved and displayed.

 ![Columns Tab for Data Filtering](https://forum.avicennaresearch.com/uploads/default/original/1X/311326b0513414330a2406a898fd1311f67e9af5.png)

Columns can be easily rearranged with drag-and-drop using the horizontal lines.

You can revert the selected columns in a filter back to their default settings by clicking on `Reset to Default` under the Columns tab.

## Managing Filters

To manage your filter, click on the menu on its right side. This will give you the option to duplicate your filter, export its result as a CSV file, set it as default, rename, or delete it:

 ![Modifying filters in Manage Filters dialog](https://forum.avicennaresearch.com/uploads/default/original/1X/965799ac752d195ff10e8e47af7d20070309fb7b.png)

### Exporting Filter Results

You can export the filtered data in CSV format for further analysis. Here are two ways to do so:

1. **Without Applying Filter** : In `Manage Filters`, select `Export Results as CSV` for a chosen filter in the 3-dots menu to export and download the data.

 ![Export data without applying filter](https://forum.avicennaresearch.com/uploads/default/original/1X/4ab0ec7a749f77e2e62db3d3e4455fb65f9a56b0.png)

1. **After Applying Filter** : Next to the `Filters` drop-down, use `Export as CSV` button to export and download the data as per the currently applied filter.

 ![Export data after applting filter](https://forum.avicennaresearch.com/uploads/default/original/1X/589e2102adb7a4993a1c579621830ab497c352f4.png)

---

_[View the full topic](https://forum.avicennaresearch.com/t/data-filtering/1272)._
