# Help needed on advanced Filter function

**URL:** <https://connect.superhuman.com/t/help-needed-on-advanced-filter-function/3060>\
**Category:** Ask the Community\
**Created:** [October 23, 2018, 7:25pm UTC](https://connect.superhuman.com/t/help-needed-on-advanced-filter-function/3060 "2018-10-23T19:25:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Farnsworth](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/matthew_farnsworth/32/7014_2.png) [@Matthew\_Farnsworth](https://connect.superhuman.com/u/Matthew_Farnsworth)\
**Post date:** [October 23, 2018, 7:25pm UTC](https://connect.superhuman.com/t/help-needed-on-advanced-filter-function/3060/1 "2018-10-23T19:25:42Z")

</div>

Greetings,

I’ve a bit of an issue that I could use some help on. I’m trying to use the Filter function to show a list of clients that appear in one table but not in another.

Here are the details:

- Client Table - contains a list of clients, codes, locations, etc.
- Schedule Table - each column represents different locations while the rows represent the clients that appear in the location specified.
- Unassigned Clients - A table that displays clients that are assigned to a location (based on the Client Table) but do not appear in the appropriate column of Schedule Table.

I’ve been toying with variates of

- [ClientTable].ClientName.filter([ClientTable].Location = (“Location”))  
just to get a list of clients assigned to each location but I can’t get that part to work.

Any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Matthew\_Farnsworth](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/matthew_farnsworth/32/7014_2.png) [@Matthew\_Farnsworth](https://connect.superhuman.com/u/Matthew_Farnsworth)\
**Post date:** [October 23, 2018, 7:44pm UTC](https://connect.superhuman.com/t/help-needed-on-advanced-filter-function/3060/2 "2018-10-23T19:44:19Z")

</div>

Okay, I got the first part sorted:

- [ClientsTable].filter(Location.contains(“Casper”)).Nth(RowId(thisRow))

Now I just need to figure out how to take the results and filter out any values that appear in [ScheduleTable].Casper

---

<div class="post-metadata">

**Author:** ![Joseph\_B](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/joseph_b/32/6636_2.png) [@Joseph\_B](https://connect.superhuman.com/u/Joseph_B)\
**Post date:** [October 23, 2018, 7:46pm UTC](https://connect.superhuman.com/t/help-needed-on-advanced-filter-function/3060/3 "2018-10-23T19:46:34Z")

</div>

Hello. This sounds doable, but can you give any additional insight on where do you want the list to appear (in a table?), and how the tables are current structured?

Also, couple of immediate thoughts:

1. For the Schedule Table, if you have the column names as location names, you cannot easily reference those column names like you can in Excel/Sheets. That may not be an issue for you, but making sure you are aware.

2. If you are looking to create a list of items, the filter would go before the item you are trying to filter.

e.g. Instead of [ClientTable].ClientName.filter([ClientTable].Location = (“Location”)), you would do

```
[ClientTable].Filter(Location=X).ClientName
```

---

<div class="post-metadata">

**Author:** ![Matthew\_Farnsworth](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/matthew_farnsworth/32/7014_2.png) [@Matthew\_Farnsworth](https://connect.superhuman.com/u/Matthew_Farnsworth)\
**Post date:** [October 23, 2018, 8:19pm UTC](https://connect.superhuman.com/t/help-needed-on-advanced-filter-function/3060/4 "2018-10-23T20:19:39Z")

</div>

Hi Joseph,

Thanks for the quick response.

This data is appearing in a table. Here are the table headers (or at least the relevant ones):

ClientTable

- ClientName | Location (multi select dropdown list) | StartDate | EndDate
- This table is connected to some buttons that create new rows

ScheduleTable

- SlotNumber | Location1 | Location2 | Location3
- This table is designed to allow the user to place all the assigned clients into the correct order. There is a completely different table that will use this order to create a formal calendar.

UnassignedClients

- Location1 | Location2 | Location3
- This is the table I’m currently working on. The idea is that this table will generally be empty. Anytime a new client is added to the ClientsTable, it will appear in the UnassignedClients table until the client is given a slot in the ScheduleTable in the appropriate column.

Someday I would love for the ability to reference the header rows, but until then, I’ve got to manually reference the headers.

---

<div class="post-metadata">

**Author:** ![Joseph\_B](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/joseph_b/32/6636_2.png) [@Joseph\_B](https://connect.superhuman.com/u/Joseph_B)\
**Post date:** [October 24, 2018, 2:59pm UTC](https://connect.superhuman.com/t/help-needed-on-advanced-filter-function/3060/5 "2018-10-24T14:59:11Z")

</div>

Thanks for the additional clarity.

Tackling the most immediate question, I built an UnassignedClients table by making a view of the ClientTable and adding a filter. I’ll walk through my steps below, with pardons if any individual step is obvious:

1. First I created a view of the Client table by clicking the plus in the corner, and selecting the Client table under “Insert View Of”

 ![image](https://global.discourse-cdn.com/coda1/original/2X/3/36512ac8bc68719bc09aa8badbf41d80426de30e.png)

1. On this view table, I renamed it to UnassignedClients. I then added the following formula to the filter:

 ![image](https://global.discourse-cdn.com/coda1/original/2X/1/1402a58d5003b01904f679afd84e0809871992e3.png)

For reference, this is what my Client table looked like:

![image](https://global.discourse-cdn.com/coda1/original/2X/e/e91590c15b9d35ce21d2cc0d5b6c3bf21fc9d185.png)

Now, as clients are added to the client table, if no location is assigned, they automatically are added to the UnassignedClients table.

For more information on Views, Coda has a write up [here](https://help.coda.io/organizing-your-doc/setup-best-practices/creating-a-view).

---

<div class="post-metadata">

**Author:** ![Adam\_Clewley](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/adam_clewley/32/6583_2.png) [@Adam\_Clewley](https://connect.superhuman.com/u/Adam_Clewley)\
**Post date:** [October 27, 2018, 9:10pm UTC](https://connect.superhuman.com/t/help-needed-on-advanced-filter-function/3060/6 "2018-10-27T21:10:02Z")

</div>

> [@Joseph\_B](#):
>
> [ClientTable].Filter(Location=X).ClientName

That tip on chaining has really helped me out, thanks!

---

<div class="post-metadata">

**Author:** ![Joseph\_B](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/joseph_b/32/6636_2.png) [@Joseph\_B](https://connect.superhuman.com/u/Joseph_B)\
**Post date:** [October 28, 2018, 6:12am UTC](https://connect.superhuman.com/t/help-needed-on-advanced-filter-function/3060/7 "2018-10-28T06:12:16Z")

</div>

Glad to hear it helped!
