I have two Tables, main and form. I want in the form table a row “average” to be the sum of the “grade” divided by the sum of the “weight”, but only when the “subject” rows in the main and form table are the same.
Now i got something like this: SUM(main[grade]) / SUM(main[weight]), but it averages every grade from every subject.