Syntax in Dataview

What I’m trying to do

I want to create a table or list of files that contain one of two criteria. The two criteria are:

  • One Metadata field + One Tag
  • The same metadata field + different tag

Things I have tried

I’ve tried variants on the following:

Table file.cday AS Date
Where contains(log, "#tag1" or "#tag2")
Flatten log
SORT file.name desc

Each term when presented individually produces the correct result. Its the combination for which I can’t find a solution.

Search Terms I tried in various combinations

dataview. OR find one of two tags Where OR

Thanks

I might have misunderstood, but does this work:

```dataview
TABLE 
  file.cday AS Date
FROM 
  #tag1 OR #tag2
WHERE 
  log
FLATTEN 
  log
SORT 
  file.name DESC
```
1 Like

Thanks for your response.

Yes, that works.

Much appreciated.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.