Hi @Hydro, no I don’t know how to do that, but it would be interesting to know if it is possible.
With the help of @mnvwvnm, I did however update the inline expression for my average sleep duration in my weekly note. I was having problems with null errors when either I hadn’t made a daily note or hadn’t entered data into the sleep duration field. The code was trying to divide by fields containing the number 0, or something like that.
Now the code filters out those fields. And it only include data from daily notes which contain an actual number in sleep-duration
. So if I haven’t made a daily note for some of the days this week, or haven’t entered a number, the formula will filter out and calculate the average sleep duration.
-
Weekly Sleep Duration Average calculation:
=round(sum(filter(this.days.sleep-duration, (p) => p)) / length(filter(this.days.sleep-duration, (p) => p)), 2)