I have tried to address your requirement by creating a table calculation that runs down the Product and omits the Trial. You will see in the attached workbook that I have created a table calculation that works out a sum for each trial across Products. I have then created another table calculation that references the first one to calculate the median, max etc.
Does this help?
Jeffs Workbook.twbx.zip 23.7 KB