Edit: I've got it working now. I have added a new column to the right of "MTG". As well as the text scale, there is a numerical scale out of 100. So, as a teacher, if a student is predicted a C/D, I put in the lower grade a number (D = 50% on tests). So their "MTG value / 100" is 50.
For the three-part "meeting target grade" scale of not achieved / achieved / surpassed I use the calculation:
=((TEST ITEM/24)*100-MTG VALUE)+1.5
As you can see, it just involved me turning the test item score into a percentage (the part highlighted in bold). Please tell me if there is a more elegant way of doing this (e.g. if there is a command for returning a value already turned into a percentage using the max score value that moodle uses to produce the category total).
That's an interesting solution! I only have one more question now:
Would I have to change the "minimum target grade" scores to a numerical input? Currently I use custom scale from which letters can be chosen - see the column on the left in my image. A predicted grade of a "C" means that students are expected to score at least 60% on a test. Is there a way of telling moodle to read a C from my custom scale as '60'? If not, I would have to get my colleagues to change their current letter inputs to numerical inputs.
However, once moodle can read the minimum target grade as a number, I can just calculate the "category total" (which already is a percentage) minus the minimum target grade (when it is a percentage) to get the desired result. I'll hold off trying this for a short while in case I don't have to change all the 'minimum target grade' scores to numbers out of 100.