**After reading this article you will know:**

What grouping in filters means

How to build logic into filters

## HowTo apply grouping in filters

You can create complex filters by grouping certain conditions together in an `AND`

/`OR `

construction.

Each row you add to a filter contains a condition which is used to filter data. Multiple rows can be joined together with an `AND`

so that condition **A** `AND`

**B** must be true for a record to turn up. But you can also use an `OR`

so that **A** `OR`

**B** has to be true for a record to turn up. You can group rows together to make this more complex.

Let’s start with creating a grid filter.

After creating the new filter, add a condition to your first condition row.

To use grouped rows, we will need multiple condition rows. You can add a new condition row by clicking on the

*Add condition row*button.A new condition row will appear where you can create another condition that you data has to meet.

Between the 2 condition rows there is an

`AND`

*/*`OR`

`AND`

*,*or that either one of the conditions has to be true with`OR`

. Let’s choose`AND`

Now we have a filter that uses 2 condition rows, but what if we need a filter with even more condition rows? That is possible, but there is a catch. The conjunctions need to be the same within a group, and this is where grouping comes into play. Let’s continue with the filter that we have just created.

Create a new condition row and set the condition. The new conjunction of the condition rows will be set to

`AND`

. When trying to change this to`OR`

`OR`

.Select the 2 bottom condition rows. You can do this by clicking on the checkbox on the left side of the condition row.

Click on the

*Group rows*buttonWith the new condition group we can change the conjunction of our group to

`OR`

We have created a simple grouped filter with multiple condition rows. You can make these filters as complex as you want them to be. If you want to know more about grid filters you can check out this article explaining each setting of the filters: ** Filter Reference**.

## Examples

We have conditions rows **A**, **B** and **C** with the following cases:

All must be true so: **A** `AND`

**B** `AND`

**C**

At least one must be true: **A** `OR`

**B** `OR`

**C**

**A** must be true, or **B** and **C** must both be true: **A** `OR`

(**B** `AND`

**C**)

**A** or **B** must both be true, or **C** and **D** must both be true, and **E** or **F** must both be true: (**A** `AND`

**B**) `OR`

(**C** `AND`

**D** `AND`

(**E** `OR`

**F**) )

If you want to read more about filters you can check out: *HowTo filter data in a grid?*