INstead of using the grouping, create two formula to get your values to sum
then you have two reults to use for the %
//Salary
if table.typefield = 'salary' then table.valuefield else 0
//benefits
if table.typefield = 'benefits' then table.valuefield else 0
if sum(@salary) <> 0 then
sum(@benefits)%Sum(@salary)
if you have another level of grouping in that then you can do the sum of each of the formulas at that group level (like summaries at an organizational team or an employee group)