Create a calculated field using IF THEN logic that results in the sum or the average. Then put that field on your rows shelf.
If you can attach a .twbx or explain the logic I can provide more detail.
Hope this helps!
thank you so much! you are a genius