The last training of the week

Hello community!

I created a fitness monitoring application with 10 training sessions divided into 5 categories.

I have a dashboard page in which I inserted 2 big numbers.

I try to display in the first one : the last type of session that I practiced the current week.

To put it simply, if my last session was “running” I want to see the mark “last session: running”

I am also looking for how to roll up the trainings of the current (from Monday to Sunday) and put the data on my big numbers 2.

Do you have an idea of ​​how I can store my data to achieve my goals?

Best

For this one you can use a Single Value → Last

For this one, you’ll first need to calculate the date of Monday of the current week. You can do that with the following math formula:

Now+
MOD(8-WEEKDAY(Now),7)
-6
-HOUR(Now)/24
-MINUTE(Now)/1440
-SECOND(Now)/86400

Next, add an if-then-else column to your Log table:
– If training date is on or after Monday (math column), then true
Finally, use a rollup column to count the number of true values in the if-then-else column.

It works perfectly, you are a beast !!

Thank you !

I’m looking to finalize, I have a chart with my differents types of trainings but surprisingly I only have 10 results while my data set has 85 lines.

This chart is pointing to my “Type of training” column (with 85 lines). I checked, the number of item was not limited.

Maybe I have to create a roll up per different type of training ?

Best.

Is this different types of training for each user, or is it targeting the whole table? Can you share some screenshots of your setup for this?

1 Like

Hello,

There is the same types of trainings for all users.

Datas :

  • There is only 85 lines on my tab “Training sessions” so, only 85 trainings sessions;
  • One session has only one type of training;
  • I have 5 types of trainings.

One IF column named “Type d’entrainement” with all the types of my trainings.
One “total entrainements” column with all the training from the start.
I created a boolean column by type of training (true/false) to get the number from one specific type of training.

I have one roll up field with the number of all trainings, called “Type d’entrainement”.

There is one video :

My current chart with figures that do not correspond at all to reality (I only have 85 training sessions).

Have you some idea ? :slight_smile:

Can you show how your chart is configured?

1 Like

Yes

I did 44 sessions of “intense cardio”, I would have to manage to use this unique value “44”, instead I have a 44 to all rows which add up to a huge number.

Okay. I would probably do this a little differently.

What I would suggest is to create a “Training Types” table. This needs a column with one row for each type of training. Then create a multiple relation from this table to your Training Log table, matching the training type in each. Then add a rollup->count via that relation. Then use this table as the source for your chart.

1 Like

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