 # Aggregate Calculations

When editing a reporting period’s settings, it is possible to choose from one of four pre-defined aggregate calculations designed for the South African context. However, some schools prefer to create their own calculations which take their specific circumstances into account.

Custom calculations are entered using a text box which requires knowledge of the following syntax to express the calculation.

There are five elements that you can use in the formulae:

• M(<subject>, <weighting>): fetch the mark from a single subject, provided it with a weighting
• W(<weighting>, <Mark>, <Mark>, …): calculate a weighted average of many marks, provide it with a weighting.
• T(<number>, <weighting>, <Mark>, <Mark>, …): find the top <number> of marks from the list provided and give it a weighting. Note that if fewer marks are available, the weighting is reduced by the same ratio. For example, if “top 3 marks with a weighting of 3” is selected, but only 2 marks are available, the weighting will be adjusted to two thirds of the original weighting: 2.
• F(<number>, <weighting>, <Mark>, <Mark>, …): find the first <number> of marks from the list provided and weight them. Note that if fewer marks are available, the weighting is reduced by the same ratio. For example, if “first 3 marks with a weighting of 3” is selected, but only 2 marks are available, the weighting will be adjusted to two thirds of the original weighting: 2.
• P(<subject>, <minimum>, <alternative subject>, <weighting>): This fetches a subject’s mark provided it meets the <minimum> mark provided, otherwise it will fetch the mark from the given alternative, if it exists. The alternative could be higher or lower than the preferred mark. If the alternative is not present but the preferred subject is (and is below the minimum result) the preferred subject result is used.

This is used specifically in the scenario where schools offer the Mathematics/Mathematical Literacy combination and want to count Mathematics in the aggregate if it is over 50%, otherwise count Mathematical Literacy. Note also, that the subject results and the minimum requirement are both rounded to their nearest percentages before the comparison is done.

Each of the “<parts>” indicated above is now explained:

• <subject> refers to the subject code. This is a whole number such as 15 or 44.
• <weighting> refers to the relative weighting of this result to other results in the calculation.
• <number> refers to the number of marks that should be selected from the list of marks provided.
• <Mark> can be replaced by any one or more of the five elements above.

An example of an aggregate calculation might look like this:

W(1,
M(
1, 1),
M(
2, 1),
P(
3, 50, 4, 1),
W(
0.5,
M(
5, 0.25),
M(
6, 0.75)
)
T(
3, 3,
M(
7, 1),
M(
8, 1),
M(
9, 1),
M(
10, 1)
)
)

This can be interpreted as follows:

“Calculate the weighted average of the following marks (note that this has a weighting of 1, but that is ultimately irrelevant because this result of this bracket is not weighted against anything else):

• Subject 1, adjusted to a mark out of 1
• Subject 2, adjusted to a mark out of 1
• Subject 3 (e.g. “Mathematics”), if it is over 50%, otherwise subject 4 (e.g. “Mathematical Literacy”), adjusted to a mark out of 1
• A result to count as half a subject (e.g. “Life Orientation”), consisting of a weighted average of:
• Subject 5, adjusted to a mark out of 0.25 (e.g. “Physical Education”)
• Subject 6, adjusted to a mark out of 0.75 (e.g. “LO Theory”)
• The best three results from the list of subject results, weighted to count as three subjects

Note that the use of “Life Orientation” and “Physical Education” above are just to provide a context where such a calculation might be used and does not imply a recommended approach!

All spacing and commas in the calculation are entirely optional. New lines are not required and do not convey any meaning. The brackets that are used for grouping are very important. The colour used here is merely for illustrative purposes to indicate what each part represents. The colour does not appear in ADAM.

The expression below is identical in function to the one above, but, I think you’ll agree, a bit more difficult to understand!

W(1 M(1 1) M(2 1) P(3 50 4 1) W(0.5 M(5 0.25) M(6 0.75)) T(3 3 M(7 1) M(8 1) M(9 1) M(10 1)))