# Filter combination of ands/ors

**URL:** <https://community.glideapps.com/t/filter-combination-of-ands-ors/17387>\
**Category:** Ask for Help\
**Created:** [October 20, 2020, 9:54pm UTC](https://community.glideapps.com/t/filter-combination-of-ands-ors/17387 "2020-10-20T21:54:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Misty\_Meadows](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/misty_meadows/32/15473_2.png) [@Misty\_Meadows](https://community.glideapps.com/u/Misty_Meadows)\
**Post date:** [October 20, 2020, 9:54pm UTC](https://community.glideapps.com/t/filter-combination-of-ands-ors/17387/1 "2020-10-20T21:54:39Z")

</div>

I have an inline list that I would like to filter with a combination of ANDs/ORs. It looks like I can do one but not both. The use case is that I have a table that has a series of checkboxes, say Q1 and Q2, and my user has corresponding checkboxes. I want to display a given item in the table if:

((Q1 is true AND Q1response is true) OR (Q1 is False)) AND ((Q2 is true AND Q2response is true) OR (Q2 is False))

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 20, 2020, 11:40pm UTC](https://community.glideapps.com/t/filter-combination-of-ands-ors/17387/2 "2020-10-20T23:40:56Z")

</div>

Can’t think of another way other than a combination of many If Then Else columns. Sounds pretty complex.

---

<div class="post-metadata">

**Author:** ![Misty\_Meadows](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/misty_meadows/32/15473_2.png) [@Misty\_Meadows](https://community.glideapps.com/u/Misty_Meadows)\
**Post date:** [October 20, 2020, 11:42pm UTC](https://community.glideapps.com/t/filter-combination-of-ands-ors/17387/3 "2020-10-20T23:42:11Z")

</div>

How would I create the columns? The Q1response column is based on user input.

---

<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:** [October 21, 2020, 12:01am UTC](https://community.glideapps.com/t/filter-combination-of-ands-ors/17387/4 "2020-10-21T00:01:38Z")

</div>

See if this gives you some ideas:

> [@Logical Math Column](https://community.glideapps.com/t/logical-math-column/16505/2):
>
> No, you currently cannot mix AND’s and OR’s in conditions, but there are a few options: Put all of the logic in your sheet using however many columns are necessary, or reverse your thought a little bit and set up an IF/THEN column like this: IF C=0 THEN ‘true’ ELSE IF A\<\>1 THEN ‘false’ ELSE IF B\<\>1 THEN ‘false’ ELSE ‘true’ Put all of the AND logic in the sheet and only use OR’s withing the filter conditions. Not always, but sometimes you can reverse your thinking like the first example and…
