# Filtering logic (grouping)

**URL:** <https://community.glideapps.com/t/filtering-logic-grouping/66322>\
**Category:** Ask for Help\
**Created:** [September 19, 2023, 4:01pm UTC](https://community.glideapps.com/t/filtering-logic-grouping/66322 "2023-09-19T16:01:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![filipr](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/filipr/32/57781_2.png) [@filipr](https://community.glideapps.com/u/filipr)\
**Post date:** [September 19, 2023, 4:01pm UTC](https://community.glideapps.com/t/filtering-logic-grouping/66322/1 "2023-09-19T16:01:53Z")

</div>

A quick question: how to set filtering logic in FILTER DATA with both operators as follows:

(A or B) and C

It seems that there is a possibility to pick only AND or OR, but never both.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 19, 2023, 4:14pm UTC](https://community.glideapps.com/t/filtering-logic-grouping/66322/2 "2023-09-19T16:14:58Z")

</div>

IF logic in Glide is gross.

You are better off moving that logic into your table with an IF column, and then flip your logic around to make it work with Glide’s limitation.

Something like this:

```auto
IF <> C Then false
ELSEIF = A Then true
ELSEIF = B Then true
ELSE false

```

Then change your filter to use that IF column instead and only check for True (checked).
