Weekly Average via a related portal
I have 2 tables that I want to work with to get a weekly average.
The first table is students.
The second table contains their work hours.
The work hours table has these fields:
An example entry would be:
Each week ends on a Thursday, so the Weekending field will always be a Thursday.
What I would like to achieve is a field on my students layout, that always gives the average hours worked by Weekending week, for each student. Note that this would not be a report with sorted data, but simply a calculation field that got the average hours worked by week in a relation.
Is there a way to do this? The issue I run into is the sorting by weekending when it's a calculation. I don't know if it can be done.