DataView: Sum repeating inline property in same note

What I’m trying to do

I want to use the same inline property multiple times in one note. Then sum those property values in a dataview table. I haven’t had any luck finding this specific use case by looking through forum posts or articles/videos.

ie: each note would have its own dataview table that just sums up the inline property that appears multiple times in the same note.

As a practical example, I want to use inline properties to track point values for each activity I complete. ie: In my workout note, for every X push ups I want to assign X points. Doing X pullups equals a different number of points, but they use the same property ‘points:: X’.

I’m hoping to have it structured roughly something like this in the note:

Morning Push Ups:

  • 50 pull ups = points:: 30

Morning Pull Ups:

  • 25 pull ups = points:: 25

Evening Push Ups:

  • 50 pull ups = points:: 30

Evening Pull Ups:

  • 25 pull ups = points:: 25

Things I have tried

I’ve tried a variety of table queries. I’ve tried GROUP and FLATTEN by the file.name, rows.points and other values. This is the latest one I have:

TABLE sum(number(rows.points)) as Workouts
FROM "Testing 1"
GROUP BY Workouts

This shows each points on separate line and does not sum and consolidate to one line.

Workouts (1) Workouts
- * 30
* 25
* 30
* 25

If you’re within the current file and want to sum the points can’t you then just do: `= sum(this.points) `? Or if you’re unsure whether you’ve got one or more values: `= sum(flat(list(this.points))) ` ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.