Last time I discussed a topic / person in my dailies

Hi @Bayerse.

Let’s try to find a way to solve your dataview query with all your requisites.

I made a test with your structure (“people” and “journal” files) and my first observation is: instead of @follow-up I used the tag #follow-up, because the symbol @ at the start of a tag give me a error (I suppose that is not allowed in tags).

The general structure of the query could be this:

```dataview
TABLE WITHOUT ID file.link AS "Person", file.inlinks AS "Last Contact"
FROM #follow-up
```

This query gives us the list of people with the tag #follow-up and the links of the daily notes where each person is mentioned. Results like this:

But you want to filter the list in “Last Contact” only to the last daily note where person is mentioned. To do that, I suggest in first place sort “file.inlinks”, then reverse this order (the most recent in first place) and finally filter the list to present only the first object in that list (using [0]). I.e., this query:

```dataview
TABLE WITHOUT ID file.link AS "Person", reverse(sort(file.inlinks))[0] AS "Last Contact"
FROM #follow-up
```

Finally, we need to sort the results by the most recent contact:

```dataview
TABLE WITHOUT ID file.link AS "Person", reverse(sort(file.inlinks))[0] AS "Last Contact"
FROM #follow-up
SORT file.inlinks DESC
```

Is this what you want?

3 Likes