Fitness tracking with dataview

Things I have tried

What I’m trying to do

I would like to use Obsidian and dataview to track my workouts and exercise progression. I have read this post, but would like to do something “simpler” with more flexibility.

I was thinking something along the lines of having exercise notes and workout notes. The exercise notes keep track of a single exercise and would use dataview to query the repetitions achieved from the latest workout notes. The workout notes (which I would manually generate the night before) would have a list of exercises (linked to their respective exercise notes) that I am planning to perform along with some goal repetitions etc. During the workout I would fill out the repetitions achieved.

The issue I am coming up against is trying to figure out a method of the exercises querying their repetitions from the workout notes.

Initial workout note idea

I was initially thinking something along the lines of this for the workout note:

workout_date:: 2021-09-16
tags:: #fitness/workout 
# Title
## Warm up

## Strength
[[link-to-exercise-1]]:: 5, 6, 7
[[link-to-exercise-2]]:: 4, 4, 5

Initial exercise note idea

In the exercise note I was then thinking that I would be able to query by the title of the note. e.g.

TABLE workout_date AS "Date", AS "Reps"
FROM #fitness/workout
SORT workout_date DESC

Problems with this approach

  • The first and foremost problem is that it doesn’t seem like one can use a link for a dataview annotation key.
  • The second problem is that I just want the exercise dataview query to only list values for its “own” reps.

I am pretty sure that there is an easier way to do this that I am not seeing. Does anyone have any suggestions?

It feels like I’m wrong because this seems too simple
in the workout files, write :

exercise1:: 5,6,7
exercise2:: 4,4,5

in the exercise files, write :

TABLE without id workout_date AS "Date", exercice1 AS "Reps"
FROM #fitness/workout
SORT workout_date DESC

And another exercise file with the same but with exercice2 AS "Reps"
doesn’t this work ?

Thank you @imed for your response that does work. I forgot to mention the reasons for me wanting to use the link as the key:

  1. It would hopefully allow my to use something along the lines of AS "Reps" in the dataview query so that I could use the same query for all exercise notes. Thus if I changed a name I would not have to update all the annotations down the line.
  2. Using a link in the workout note would add a level of autocomplete when filling generating the workout.
  3. I would easily be able to click the clink in the workout note to view the exercise. (I know I would work around this by putting the link above the dataview annotation.

I am not married to this method of doing things so alternate suggestions would be welcome.

You can use a template for getting the exercise file name in dataview and the links for the workout file as well. Did you try it this way ?

@imed using a template to populate the dataview is a good idea. I’ll give that a shot.

Any luck on getting this to work? I’d be interested to hear how it’s going for you?

1 Like

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