Formula to reference a previous occurrence (workout planner)

I am creating a workout planner.

On the attached workout checklist, my objective is to see the weight that I lifted last time I performed the exercise so that I am always lifting more than the previous time.

The “Exercise” column links to another table with a list full of exercises.

I would like the “Previous Weight” column to reference the “Weight” of the most recent “Date Performed” that this particular exercise was marked “Done”.

Can anybody help me with this?

Thank you!

Hi @John_R,

Welcome to the Coda Community!

I put together a sample doc for you to check out. Let me know if it does what you were hoping…

2 Likes

Thank you! This was perfect to get the job done. The formula was a bit more complicated than I expected…I’m kind of a noob to all the formula stuff.

One more question if you are able to help…

On the Exercise table, I added two new columns for Sets and Reps.

My goal is that when I create a new workout in the Workouts table, the Sets and Reps from the linked Exercise automatically populate.

For example, if I have an Exercise called “Chest - Incline Bench Press - Hypertrophy”, I want the Sets and Reps in the Workouts table to always automatically be the Sets and Reps from that particular exercise in the Exercise table. So if I’m training for hypertrophy, the new Workout table row would inform me that the Sets & Reps would be 4x8 for that day.

So it could probably just be a number field instead of a slider field.

Thank you!
John

You can use dot notation to lookup other aspects of a particular row. Dot notation is using a “.” to then specify the column.

If you lookup an exercise from your Exercise table, that would be referencing the whole row and it shows in a capsule instead of just text.

Exercise = Chest - Incline Bench Press - Hypertrophy, Incline Bench Press, Chest, Hypertrophy, 4, 8

Being more specific, you can get individual values from that row with the following formulas:

Exercise.Sets = 4
Exercise.Reps = 8

Instead of “Sets” in your Workouts table, you can use this way of showing the values for the chosen exercise for that row.

Instead of making your column in your Workouts table a slider, change it to a number, then add a formula.