I have logged movies that I watched last year. I created one note for every movie, but I want to show them in another note listing movies that I watched in 2022.
I wrote the following dataview query:
TABLE
Ano,
Assistido,
Letterboxd,
Nota
FROM
"04 - Filmes/02 - Filmes"
WHERE
Assistido >= date(2022-01-01) AND Assistido <= date(2022-12-31)
SORT
Assistido
ASC
Where “Assistido” is “DateWatched”.
The thing is, I watched “Avatar” in two separate dates, so the metadata looks like this:
Did you try any of the tips in the other thread? It does seem to be the same case of a single value turning into a list, which throws off your search cases.
In your case it does seem like you want to keep both films in list, so I would suggest to use FLATTEN transform those two values for Assistido which are present in one row for Avatar, into two rows of Avatar with one value each for Assistido.
To fully get this please execute the following query:
```dataview
TABLE
Ano,
Assistido
FROM
"04 - Filmes/02 - Filmes"
WHERE
file.name = "Avatar"
```
and
```dataview
TABLE
Ano,
A
FROM
"04 - Filmes/02 - Filmes"
FLATTEN
Assistido as A
WHERE
file.name = "Avatar"
```
One of them contains the key to what you need to change your full query to, as well.
Hope this helps, and you understand a little bit on how FLATTEN works. You are free to change A to whatever you like. I chose A since I don’t know any good alternatives to Assistido.
Bonus tip 1: Try changing the Assistido in the first query to min(Assistido) and/or max(Assistido) and see the effect of it.
Bonus tip 2: If you add another set of backticks around dataview-queries (or other code blocks) with ```` on the lines before and after, it’ll show as a proper code block in the forum question.