Could you share the entire note that this works with? I’ve copy and pasted you r code here and tried all the ones above it. I get headers to render properly, but never any results from completed tasks showing up.
EDIT: It worked after installing the tasks plugin
EDIT 2: Or maybe it worked after changing to YYYYMMDD. One of those fixed it
TABLE WITHOUT ID
file.link as Date,
choice(exercise > 30, "✅", "❌") as Exercise,
choice(sleep > 6, "✅", "❌") as Sleep,
choice(highlights >= 3, "✅", "❌") as Highlights,
choice(mindfulness > 10, "✅", "❌") as Mindfulness,
reading as Reading
FROM "daily"
WHERE file.day <= date(now) AND file.day >= date(now) - dur(7days)
SORT file.day ASC
this results in a nicely formatted table. thanks, Andrew!
It doesn’t search for any specific date heading. The only thing it looks for in the actual notes are tasks under a header named “Habits”.
The notes should be named using a “YYYY-MM-DD” naming scheme and placed in a folder named “Daily Notes” (although that can be easily changed in the code).
I made a GitHub repo for the dataviewjs snippet to make it easier to find/keep updated. It includes the fixes provided by @Jigar and @DevinBaillie and now also filters out tag text.
I’ve followed your Genshii’s instructions exactly and seem to be getting no results from the dataview js query. Did either of you encounter this problem?