Can't filter a dataview from a list property

First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.

What I’m trying to do

I am trying to create a dataview where I filter the results by a specific value from a list property-type. It simply does not work.

Things I have tried

table status, type, assignee, priority
from "11_Items ✅"
where status != "done"

Here it returns all values including those with a status = done. Then I tried this:

table status, type, assignee, priority
from "11_Items ✅"
where status = "done"

I just wanted to test to see if it would return only the “done,” values. Instead, nothing was returned.

1 Like

Do these diagnostics work?


---
status: 
  - done
status2:
  - 
---


```dataview 
table status, type, assignee, priority
where contains(status, "done")
```

```dataview 
table status, type, assignee, priority
where !contains(status, "done")
```

```dataview 
table status2, type, assignee, priority
where contains(status2, "done")
```

```dataview 
table status2, type, assignee, priority
where !contains(status2, "done")
```

1 Like

You fail to produce any test days, or current result. If your status field is a list, contains() will check against the list, but it’ll still return the entire list.

So you might need to look into using FLATTEN in order to split the list values into their separate items.