I've been restling with this for a few days now and cant seem to get it right.
I am using a dax statment to provide a cummulation figure in a matrix that works.
The next step was to - Check to see
if the Total Marks = Present then continue
CALCULATE(SUM('Attendance (Table)'[Present]),
FILTER(
ALL('Academic Year (Table)'),
'Academic Year (Table)'[Week Ending]<= MAX('Academic Year (Table)'[Week Ending])))
Then to check if they had reached the threshold
if the Cumulation reached 21 then reset the Cumulation to 0
Any help greatly appreciated.