# Multiple nested filter query AND, OR

**URL:** https://community.baserow.io/t/multiple-nested-filter-query-and-or/9839
**Category:** Technical Help
**Tags:** airtable, baserow, filter
**Created:** [April 1, 2025, 2:28pm UTC](https://community.baserow.io/t/multiple-nested-filter-query-and-or/9839 "2025-04-01T14:28:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gjk](https://community.baserow.io/letter_avatar_proxy/v4/letter/g/eb8c5e/32.png) [@gjk](https://community.baserow.io/u/gjk)
#### Post date: [April 1, 2025, 2:28pm UTC](https://community.baserow.io/t/multiple-nested-filter-query-and-or/9839/1 "2025-04-01T14:28:47Z")

</div>

### Are you using our SaaS platform ([Baserow.io](http://Baserow.io)) or self-hosting Baserow?

SaaS

### What are the exact steps to reproduce this issue?

I am currently transitioning from Airtable to Baserow and need assistance with converting my existing Airtable query into a format that works with the Baserow API.  
In Airtable, I was using the following formula to filter data:  
`OR( AND({service_addon_price_index_attribute_name}='country', {service_addon_price_index_attribute_id}=1), AND({service_addon_price_index_attribute_name}='customer_size', {service_addon_price_index_attribute_id}=2), AND({service_addon_price_index_attribute_name}='rental_period', {service_addon_price_index_attribute_id}=3), AND({service_addon_price_index_attribute_name}='notice_period', {service_addon_price_index_attribute_id}=4), AND({service_addon_price_index_attribute_name}='trailer_category', {service_addon_price_index_attribute_id}=5) )`  
Now, I want to convert this logic into a filter structure for Baserow.  
I can achieve this filtering in the Baserow UI (see image attached), but I’m struggling to construct this query for the API.

### Attach screenshots, videos, or logs that demonstrate the issue.

 ![ScreenShot Tool -20250401180228.png](https://community.baserow.io/uploads/default/original/2X/b/b64989419c203e99ca74f7b2be72d821fb777fe6.jpeg)

---

<div class="post-metadata">

### Author: ![frederikdc](https://community.baserow.io/user_avatar/community.baserow.io/frederikdc/32/2086_2.png) [@frederikdc](https://community.baserow.io/u/frederikdc)
#### Post date: [April 1, 2025, 6:09pm UTC](https://community.baserow.io/t/multiple-nested-filter-query-and-or/9839/2 "2025-04-01T18:09:37Z")

</div>

You should be able to achieve this by creating 6 filter groups.

1. Create a new view without any filters
2. Add a new filter group
3. Add the two conditions to the group using AND
4. Create a new filter group, set the conditions between the 2 groups to OR
5. Add the two conditions to the new filter group
6. Repeat this 5 times  
 ![image](https://community.baserow.io/uploads/default/original/2X/0/0174aa01562a693590ba4285bccbdcc6fa3016a4.png)

If I check your screenshot, I think you are pretty close, but just added a filter group inside a filter group because I see 3 nestings of Where
