It didn't do what I wanted.
The total grade is sum of all grades. I have 4 grades like this:
sum of grades should be: 0-20
I assigned weights to these 4 grades like this:
But there is no way to keep the max value of "sum of grades" to 20 and set max value of g4-category to 16. They will add any grade that exist in the gradebook or in the category. I want to have a grade from 20 at the end.