Hmm I'm getting an error with this code.
But my understanding is that this would calculate the sum of grade, but what i'm trying to achieve is to calculate the number of "APP" that have a grade between 10-15 (correct) and the number of APP that have between 40-45 (incorrect).
This is what I tried:
Code:
PARAMETERS [Start date dd/mm/yyyy] DateTime, [End date dd/mm/yyyy] DateTime;
SELECT MONTHPermanentTable.[ERROR CATEGORY], Count(IIF(MONTHPermanentTable.GRADE< 16, 1, 0)) AS Correct
FROM MONTHPermanentTable
WHERE (((MONTHPermanentTable.Date) Between [Start date dd/mm/yyyy] And [End date dd/mm/yyyy]))
GROUP BY MONTHPermanentTable.[ERROR CATEGORY]
If I try this way:
Code:
[PARAMETERS [Start date dd/mm/yyyy] DateTime, [End date dd/mm/yyyy] DateTime;
SELECT MONTHPermanentTable.[ERROR CATEGORY], Count(MONTHPermanentTable.GRADE) AS Correct
FROM MONTHPermanentTable
WHERE (((MONTHPermanentTable.Date) Between [Start date dd/mm/yyyy] And [End date dd/mm/yyyy]))
GROUP BY MONTHPermanentTable.[ERROR CATEGORY]
I get a total that doesn't make sense.