Let me first start by saying I am relatively new to Obsidian so may be missunderstanding how I am structuring my data.
What I’m trying to do
I am tryign to create a Dataview and am really struggling with the WHERE statement in relation to what I am trying to retrieve. I am trying to use the WHERE statement on a list property called genre. However I have populated the genre values as links i.e. [[Rock]] as I have them appearing in an infobox where I want them to be clickable.
I suspect it is the fact that I am storing them as a link that is causing the issue.
Things I have tried
I have tried the following:
Table total_artists as artists, genre
FROM "Music/Artist"
Where genre = "NWOBHM"
I have also tried the WHERE statement as
Where contains(genre, “NWOBHM”)
Where contains(genre, “[[NWOBHM]]”)
I can get the statement to work on properties that do not have a [] link which leads me to think this is the issue. If this is the case how else could I show a property list value in an infobox as a link?
Thanks for the response but no, this doesn’t work either. FYI there is no error but it returnes no results, which is also the case for the examples I have tried previously.
TABLE
artist,
genre[0]
FROM "Music/Artist"
WHERE contains(genre, [[NWOBHM]])
You can change genre[0] also to genre, depending on which style you prefer. Also make sure that the folder path "Music/Artist" is in order where your dataview query is located.