Hello to everyone.
I need some help in setting up a specific dataview querie.
Sorry in advance for my bad english.
I would like to visualize all of my “idea” notes based on the number of connections to all of my other notes which i call [[concept notes]] (and group them by number of connections.)
Now i’m using this
TABLE file.inlinks as Backlinks, length(file.inlinks) as Total
FROM "SlipBox"
SORT length(file.inlinks) DESC
but i can’t get rid of notes which are tagged “reference”.i would like to see only my “idea” notes
all of my notes look somethink like this (without actualò content)
Hi @mnvwvnm thank you
I’ve tested,but can’t get i right.I would like to see alla of my [[MOC …]] notes ,which are internally tagged “moc”, on the left side and notes tagged “idea” on right side.practically the most popular MOC notes which are linked from note with “idea” tag
i hope i get the question right.thank you
When in your first post you said “but i can’t get rid of notes which are tagged “reference”.i would like to see only my “idea” notes” you don’t specify which notes in table. So, the first deduction is: they want to filter the “source” notes, i.e., the notes you see in first column.
I started by this query
Now I have no idea about the start point.
you want to filter the source notes? The notes in first column? If yes, the notes with the tag “#moc”? Maybe FROM "SlipBox" AND #moc
you want (also) filter the file.inlinks you see in the second column? filter only file.inlinks tagged with #idea?
now i have this table.on the right i have notes which are tagged both “idea” and “reference” but i would like that the right column showed me only the ones with “idea” tag so i can see the most popular concept notes only for my ideas
1 - with a “bad code” I can suggest something like this (but implies repetitions, repetitions, etc.):
TABLE
filter(file.inlinks, (i) => contains(i.file.etags, "#idea")) AS Backlinks,
length(filter(file.inlinks, (i) => contains(i.file.etags, "#idea"))) AS Total
...
And then I guess you need to do the same in SORT command.
2 - there’s another way, but implies a more structured understanding in how works FLATTEN and GROUP BY commands. Something like:
TABLE rows.IN AS Backlinks, length(rows) AS Total
FROM "SlipBox" AND #moc
FLATTEN file.inlinks AS IN
WHERE contains(IN.file.etags, "#idea")
GROUP BY file.link AS File
SORT length(rows) DESC