Dataview WHERE function doesn't work

So i’m an internet noob trying to use data view in obsidian

I made this at the top of the page


Author: E. Renzoni
Date: 2021-07-07
Tags: Sarcoidose
Rating: ★★★★☆

and this at the bottom of the page

Author:: Vasileios Kouranos
Date:: 2019-07-07
Tags:: Sarcoidose Grave
Rating:: ★★☆☆☆

Now, i was using data view and i wanted to filter just the E. Renzoni author

First, to know it was working i wrote this:

TABLE author, date, tags, rating
FROM #Sarcoidose

and both author appeared

When i wrote this:
TABLE author, date, tags, rating
FROM #Sarcoidose
WHERE Author = “E. Renzoni”

It doesn’t filter any results

Things I have tried

So i’ve tried going back and doing the dataview only at the top of the notes and to documents and that filter worked

TABLE author, date, tags, rating
FROM “Doenças do Interstício”
WHERE Author = “E. Renzoni”

In this case, E. renzoni appears for the other documents where the metadata is written at the top (Notas and IPF), but doens’t appear in the note sarcoidose where she “shares space” with the metadata from Vasileos.

What I’m trying to do

Maybe it’s impossible to filter by author within the same note?
I just wanted, within se same page, write metadata like this:

Author:: Vasileios Kouranos
Date:: 2019-07-07
Tags:: Sarcoidose Grave
Rating:: ★★☆☆☆

and then filter it within the same page

Thank you

The following filters the author, but Dataview will report all the dates, tags, and ratings it finds on the page.

```dataview
TABLE filter(Author, (l) => l = "E. Renzoni") as Author, date, tags, rating
FROM #Sarcoidose
```
1 Like

Main problem

If I understand your point (em PT, “se eu entendi bem o seu exemplo”), you create more that one “pseudo-group” of metadata. Something like:


## My page

---

#### Group 1

Author: E. Renzoni
Date: 2021-07-07
Tags: Sarcoidose
Rating: ★★★★☆

blah, blah...

---

#### Group 2

Author:: Vasileios Kouranos
Date:: 2019-07-07
Tags:: Sarcoidose Grave
Rating:: ★★☆☆☆

blah, blah...

Metadata works by page. In your example I can resume the custom data (your defined fields, not the implicit fields) like this:

Author:
  - E. Renzoni
  - Vasileios Kouranos
Date:
  - 2021-07-07
  - 2019-07-07
Tags:
  - Sarcoidose
  - Sarcoidose Grave
Rating: 
  - ★★★★☆
  - ★★☆☆☆

As you can see, we don’t have groups (something you can create in YAML frontmatter, not in inline fields) but multiple values for the same field-key. Example: Author has two values, E. Renzoni and Vasileios Kouranos.
There’s not direct relation between “Vasileios Kouranos” and “Sarcoidose Grave” (only the fact they’re the second element in each list of values).

To do what you want you need to place your metadata in different way.

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