How to calc cost % of all income

How to calc cost % of all income

Hi,

I would like to calc the percentage of cogs but don't know how to achieve this with a aggregate formula:
Hope you guys can help! :)

My data is is modelled like this:
GLMain Cat     GLSub Cat       GLMain Desc      Amount
7                       70                     Cold meals          100
7                       71                      Hot meals            150
6                       60                     Ingredients          20
6                       61                      Packaging            25

I would like to have the percentage of Ingredients (GLSubCat 60) of total sales (GLMainCat 7)
20 / 250 = 8%