# Filtering column using conditions

**URL:** <https://community.glideapps.com/t/filtering-column-using-conditions/12959>\
**Category:** Feature Requests\
**Created:** [July 22, 2020, 11:59pm UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959 "2020-07-22T23:59:41Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yebaka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yebaka/32/9498_2.png) [@Yebaka](https://community.glideapps.com/u/Yebaka)\
**Post date:** [July 22, 2020, 11:59pm UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/1 "2020-07-22T23:59:41Z")

</div>

Hi everyone,

i’m actually facing issues with my glide app.

I couldn’t figured out how to **filter a number column by 2 conditions** (user’s ID and Checkbox value).

I need it in order to configure my bill recap in my user’s shopping cart.

I have a column “total”, in which is calculated the product price\*quantity, however i’d like to calculate the sub-total per-user and with the checkbox value equals to false.

In long story short, i have a sheet ‘orders’, every product that user put in their shopping cart create a new row in this sheet. In order to separate current user’s order and past user’s order, i made a column “statut” where there is an checkbox (boolean value) to indicate if it is an actual order or a passed order.

Even if i made the email column a row owner, i couldn’t figured out how to calculate the sum (like using a rollup column) by filtering with these 2 conditions (email and statut).

I would like to know also if Glide couldn’t provide me any tools in order to accomplish this, will i be able to do my operation in google sheet directly, using functions and eventually SQL to filter with parameters ?

---

<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:** [July 23, 2020, 12:03am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/2 "2020-07-23T00:03:17Z")

</div>

You can make a template column joining the user email and the status column. It will come back in a form like “[a@gmail.com](mailto:a@gmail.com) FALSE”.

Then make a relation matching that template column with itself, return multiple matches. Then all “[a@gmail.com](mailto:a@gmail.com) FALSE” orders will be returned.

From there, make a rollup to calculate the sum using the relation.

---

<div class="post-metadata">

**Author:** ![Yebaka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yebaka/32/9498_2.png) [@Yebaka](https://community.glideapps.com/u/Yebaka)\
**Post date:** [July 23, 2020, 12:29am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/3 "2020-07-23T00:29:02Z")

</div>

Thanks @ThinhDinh it almost works, however it blocks with the rollup column, i can’t validate the column.

I think that’s linked to the row id column i have create previously, indeed in my relation column the data reported is row id.

I’m gonna looking for ways to manage this and delete row id, and i then i think it’s gonna work.

Thanks a lot !

i will update the post if i am facing new issues with this.

---

<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:** [July 23, 2020, 12:31am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/4 "2020-07-23T00:31:43Z")

</div>

Can you specify more about how it blocks the rollup column? Some screenshots might help for me to know how you’re setting it.

---

<div class="post-metadata">

**Author:** ![Yebaka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yebaka/32/9498_2.png) [@Yebaka](https://community.glideapps.com/u/Yebaka)\
**Post date:** [July 23, 2020, 12:32am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/5 "2020-07-23T00:32:20Z")

</div>

Does anyone know how i could delete the row id ? @ThinhDinh do you think that my relation column report the row id for other reason ?

---

<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:** [July 23, 2020, 12:33am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/6 "2020-07-23T00:33:53Z")

</div>

Ah if you’re mentioning that, the relation returns the row ID solely because it’s the first column in your data.

The point of it is Glide’s telling you “We have found some matches for your relation column and we’re showing it by the first column with data by default”.

If you want to actually see the information you want to bring back via a relation, use a lookup.

---

<div class="post-metadata">

**Author:** ![Yebaka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yebaka/32/9498_2.png) [@Yebaka](https://community.glideapps.com/u/Yebaka)\
**Post date:** [July 23, 2020, 12:39am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/7 "2020-07-23T00:39:36Z")

</div>

![Capture](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/5/5aed9db267516033661ae8ba3cfde8e0aa3ed950.png)

---

<div class="post-metadata">

**Author:** ![Yebaka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yebaka/32/9498_2.png) [@Yebaka](https://community.glideapps.com/u/Yebaka)\
**Post date:** [July 23, 2020, 12:48am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/8 "2020-07-23T00:48:18Z")

</div>

It doesn’t work with a lookup column, it only shows the data of the total per product column. @ThinhDinh

---

<div class="post-metadata">

**Author:** ![Yebaka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yebaka/32/9498_2.png) [@Yebaka](https://community.glideapps.com/u/Yebaka)\
**Post date:** [July 23, 2020, 12:52am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/9 "2020-07-23T00:52:44Z")

</div>

Maybe there is another ways to manage this by using the row id column ? @Jeff_Hager

---

<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:** [July 23, 2020, 1:04am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/10 "2020-07-23T01:04:10Z")

</div>

I didn’t mean you should use lookup for this, just an explanation on how relations and lookups work together, and why the relation is returning the row ID.

Are you making a relation based on the template column and then rollup using that column? What does it return?

---

<div class="post-metadata">

**Author:** ![Yebaka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yebaka/32/9498_2.png) [@Yebaka](https://community.glideapps.com/u/Yebaka)\
**Post date:** [July 23, 2020, 9:19am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/11 "2020-07-23T09:19:14Z")

</div>

Yes i follow your instruction, i made a template column which display the value Email and statut.

 ![Capture_templte](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/a/a71eadf304f5f99ecdbcf454c1191a65db3196c7.png)

@ThinhDinh

---

<div class="post-metadata">

**Author:** ![Yebaka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yebaka/32/9498_2.png) [@Yebaka](https://community.glideapps.com/u/Yebaka)\
**Post date:** [July 23, 2020, 9:20am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/12 "2020-07-23T09:20:54Z")

</div>

Then i made the relation column between template itself. ![Capture_reltion](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/0/07151eceba6335769a6e062379c264206752000c.png)

I also move the total per product column at the beginning of my sheet, so the relation column display price instead of row id. @ThinhDinh

---

<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:** [July 23, 2020, 9:22am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/13 "2020-07-23T09:22:01Z")

</div>

Yeah but what does the rollup column return? Have you created a rollup column?

---

<div class="post-metadata">

**Author:** ![Yebaka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yebaka/32/9498_2.png) [@Yebaka](https://community.glideapps.com/u/Yebaka)\
**Post date:** [July 23, 2020, 9:26am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/14 "2020-07-23T09:26:35Z")

</div>

When i try to create the rollup column i can’t clique on “Done”. ![Capture_rollup](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/f/f57f9c2760fb4689269031067698f725c46549a5.png)

---

<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:** [July 23, 2020, 9:28am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/15 "2020-07-23T09:28:23Z")

</div>

Are all the columns that are combined to make your “Total à payer” column contain any text?

---

<div class="post-metadata">

**Author:** ![Yebaka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yebaka/32/9498_2.png) [@Yebaka](https://community.glideapps.com/u/Yebaka)\
**Post date:** [July 23, 2020, 9:34am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/16 "2020-07-23T09:34:01Z")

</div>

No both of the columns that make the “total à payer” column are number column. @ThinhDinh

---

<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:** [July 23, 2020, 9:37am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/17 "2020-07-23T09:37:29Z")

</div>

Any chance it falls into one of the things mentioned here.

> [@Can't add Rollup for Relation ('Done' is greyed out)](https://community.glideapps.com/t/cant-add-rollup-for-relation-done-is-greyed-out/10910/):
>
> For some reason, I can’t add a Rollup Column for a relation. The “Done” button is greyed out. I swear I used to be able to do this.

---

<div class="post-metadata">

**Author:** ![Yebaka](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yebaka/32/9498_2.png) [@Yebaka](https://community.glideapps.com/u/Yebaka)\
**Post date:** [July 23, 2020, 9:44am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/18 "2020-07-23T09:44:26Z")

</div>

I don’t know if i renamed it, i can’t remember. Do you think that i need to delete my relation column and then recreate it ? @ThinhDinh

---

<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:** [July 23, 2020, 9:45am UTC](https://community.glideapps.com/t/filtering-column-using-conditions/12959/19 "2020-07-23T09:45:11Z")

</div>

Yeah can you please try that, did you rename it at any point?
