Forum Academy Marketplace Showcase Pricing Features

What is the best way to calculate Dashboard data (statistics) for each user?

Hi,
i want to build a little software to track my homegym workouts in bubble.

What i have now:

Users can Login, they have an interface to add a workout with start time, end time, and repetitions of their exercises. And they can add exercises.

What i want to archive:

I would like to have a dashboard with some basic statistics about my workouts when i login.

Some examples for the statistics are:

  • How many workouts did i track
  • avarage workout duration
  • avarage repetitions per exercise
  • avarage repetitions per workout
  • for how many days in a row did i workout
  • avarage repititions per day for the last 30 days

So some basic statistic functions.

I am new to bubble but have been coding for many years.

What i tried:

I installed bubble charts - i got a nice bar chart working with avarage exercises per day for the last 30 days → this works great but is not useful for calculations?

I installed math.js but couldnt get any expression working

I tried a new datatype called Dashboard Data which is attached to my user. My idea was, each time, i add a new workout, i update the dashboard data. I played around here with some group, sums, date filters and others and got some data working like the total count of repetitions over all workouts, or counting the sessions. But i fail to implement more advanced calculations here and it just feels very cumbersome and “wrong”.

I researched about external spreadsheet solutions but this also feels very wrong like this should be a basic feature?

So the question is: How do you statistical calculations for a dashboard in bubble. The statistics need only be updated, when the user enters new data (workout).

Any pointers to tools, concepts or a basic example would be great as i could find any examples of this.