Issues with dataview, pulling weekly and daily notes into my monthly notes 23

r/ObsidianMD - Issues with dataview, pulling weekly and daily notes into my monthly notes

Hi everyone! I recently set up, based also on Bryan Jenks video on daily notes (https://www.youtube.com/watch?v=5k4LfCVY0yQ&t=573s) a reviews system, where basically highlights for the Week, Month, and Year are all pulled from the daily notes. However, I have some issues regarding both aliases (they don’t get recognise) and also, with the naming. I prefer to call my monthly note (YYYY-MM) instead of his (YYYY-[M]MM), but in this case I don’t know how to set up the code. If I put just this.file.name instead of his code: replace(this.file.name, “M”, “”). It doesn’t work.

Below the code (I have a different synthax for “unequal” symbol, but it should not be a problem):

dataview

TABLE WITHOUT ID file.day.weekyear " AS Week, highlights

FROM “Journal/Daily”

WHERE highlights != null

AND file.day.year number(substring(this.file.name, 0, 4))

AND dateformat(file.ctime, “yyyy-MM”) = replace(this.file.name, “M”, “”)

SORT file.day

If you don’t have the extra “M” in the filename, you can us it as-is, without manipulating the string. I’d suggest using the creation date, though.

You can use file.cdate to access the creation date, look at the first line of your sample :slight_smile:

Have a look here:
https://blacksmithgu.github.io/obsidian-dataview/reference/literals/#dates
and here:
https://blacksmithgu.github.io/obsidian-dataview/annotation/metadata-pages/