Help with → Sum YAML values from notes that link to this note (‘FROM [[#]]’), DataViewJS?
Trynig to → Track payment from tag (#payment) and link to the current note ([[#]]); sum values in specific YAML tag resulting from aforementioned query.
Hello folks! First time posting here, so please be patient =)
I’m trying to use Obsidian + DataView + Templater (essentially) to keep track of my classes (I’m a dance instructor). I’ve already managed to make templates for each class, each course, and each student. The student files are basically derived from the classes and courses he/she takes, using DataView.
The next step is to track payment. I’ve made a simple file for each payment, with a YAML header containing the corresponding class, date, value, the tag #payment and a link to the students’ note (the link is both in the YAML header and the body of the payment note).
Recently I added to the students’ note (and to the template for new students) a DataView table with his/her payments. That was the easy part, using FROM [[#]] AND #payment
in my query whithin the student’s note.
I’ve been looking for a way to sum all the payments from a specific student, and have not found it yet. The solutions I’ve found (wich use DataViewJS) can sum all the “value” YAML tags from all notes with the tag #payment but it sum all the payments, from everybody.
How can I return something similar to te results from the query FROM [[#]] and #payment
, except that all the values are summed up? I think it is possible to do it using DataViewJS, but JavaScript isn’t something I can learn overnight (I’ve studied the basics, a few months ago, but I’m still very noob, it’s hard even to adapt answers I find to my specific problem). Any ideas?
If it’s not possible, I can work around it by making individual folders to group up the payments by student… But I’d like to make the same analysis for different courses, or just the private classes, or just within a semester… A makeshift solution would solve the immediate problem, but prevents further enhancement.
Thanks in advance!