# Filtering a table

**URL:** <https://connect.superhuman.com/t/filtering-a-table/14921>\
**Category:** Ask the Community\
**Created:** [April 5, 2020, 11:26am UTC](https://connect.superhuman.com/t/filtering-a-table/14921 "2020-04-05T11:26:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Breno\_Nunes](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/breno_nunes/32/12706_2.png) [@Breno\_Nunes](https://connect.superhuman.com/u/Breno_Nunes)\
**Post date:** [April 5, 2020, 11:26am UTC](https://connect.superhuman.com/t/filtering-a-table/14921/1 "2020-04-05T11:26:27Z")

</div>

Hi. The more I use coda, the more I like it. I wish there were more in-depth videos explaining advanced ways of filtering a table, how to use sequence() and formulaMap and other advanced formulas…

I’ve been trying to filter a table that, at first, it seemed simple thing to do but I just can’t do it.  
Can someone help me? Thank you

[https://coda.io/@breno-nunes/filtering-fruit](https://coda.io/@breno-nunes/filtering-fruit)

 ![fruit](https://global.discourse-cdn.com/coda1/original/2X/4/4dc1dd0952e5ce8fc98a30546aa4041669ed5326.jpeg)

---

<div class="post-metadata">

**Author:** ![Brendan\_Woithe](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/brendan_woithe/32/11353_2.png) [@Brendan\_Woithe](https://connect.superhuman.com/u/Brendan_Woithe)\
**Post date:** [April 5, 2020, 12:14pm UTC](https://connect.superhuman.com/t/filtering-a-table/14921/2 "2020-04-05T12:14:56Z")

</div>

I know I _still_ struggle with filtering at times.  
But I’m getting better. I’ll give it a go helping you…  
but I can’t quite get what you’re trying to do… what behaviour do you want the flavor table to have? Does the third “fruit” table have any relationship at all to your question?

---

<div class="post-metadata">

**Author:** ![Breno\_Nunes](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/breno_nunes/32/12706_2.png) [@Breno\_Nunes](https://connect.superhuman.com/u/Breno_Nunes)\
**Post date:** [April 5, 2020, 12:36pm UTC](https://connect.superhuman.com/t/filtering-a-table/14921/3 "2020-04-05T12:36:41Z")

</div>

Hi. Thank you your help. The column fruit in the flavor table is a lookup column of the third table “fruit”.  
If I change “choose a fruit.First” in my filter formula to “banana” it works just fine. But the problem happens when I’m referencing another row in another table.

---

<div class="post-metadata">

**Author:** ![Brendan\_Woithe](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/brendan_woithe/32/11353_2.png) [@Brendan\_Woithe](https://connect.superhuman.com/u/Brendan_Woithe)\
**Post date:** [April 7, 2020, 5:52am UTC](https://connect.superhuman.com/t/filtering-a-table/14921/4 "2020-04-07T05:52:30Z")

</div>

I’m not in coda right now - but my guess is that you’re trying to filter by a table. I’d try  
fruit.contains(choose a fruit.chosen fruit).first()

---

<div class="post-metadata">

**Author:** ![Breno\_Nunes](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/breno_nunes/32/12706_2.png) [@Breno\_Nunes](https://connect.superhuman.com/u/Breno_Nunes)\
**Post date:** [April 8, 2020, 2:25am UTC](https://connect.superhuman.com/t/filtering-a-table/14921/5 "2020-04-08T02:25:49Z")

</div>

Hi, Brendan  
Thank you. I tried but it didn’t work.

 ![coda queston](https://global.discourse-cdn.com/coda1/original/2X/b/b8b02af32968d10d25441e0a14e8c6ca3d674588.gif)

I uploaded a video that I believe shows the issue.  
Could you please take a look?  
Hi, @Ben_Lee, @Ander, please, could you guys, help me  
[https://coda.io/@breno-nunes/filtering-fruit](https://coda.io/@breno-nunes/filtering-fruit)

---

<div class="post-metadata">

**Author:** ![Ander](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/ander/32/9134_2.png) [@Ander](https://connect.superhuman.com/u/Ander)\
**Post date:** [April 8, 2020, 12:53pm UTC](https://connect.superhuman.com/t/filtering-a-table/14921/6 "2020-04-08T12:53:58Z")

</div>

@Breno_Nunes

`fruit.First()=thisRow.fruit` 👈 These both reference a row in the table `[fruit]`. These ARE able to match.

`[choose a fruit].First()=thisRow.fruit` 👈 One references the first row in table `[choose a fruit]` and the other references a row in table `[fruit]`. A row from one table is NOT able to match a row from a different table (without doing some extra stuff).

Play with the blue fields in the below doc.

Study the formulas in the yellow fields.

https://coda.io/embed/EQ-9Jqr_EB/_su2gj?viewMode=embedplay

---

<div class="post-metadata">

**Author:** ![Breno\_Nunes](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/breno_nunes/32/12706_2.png) [@Breno\_Nunes](https://connect.superhuman.com/u/Breno_Nunes)\
**Post date:** [April 8, 2020, 8:42pm UTC](https://connect.superhuman.com/t/filtering-a-table/14921/7 "2020-04-08T20:42:17Z")

</div>

@Ander  
Thank you very much for your help.  
I really really really appreciate it 😃  
I found out another way of doing it after reading your post.  
**[choose a fruit].First()**.[chosen fruit]= **thisRow.fruit**.fruit  
I “dereferenced” both side of the formula as shown above.  
I tried that before but only on one side. I thought that thisRow.fruit was already “dereferenced”.  
But it’s not. Funny.  
Again, thank you for taking your time to help me.

Breno
