How to have several subtotals in the same sheet?

Hello,

Assuming I have rows with people info and need to calculate two subtotals, an age average per sex and years of work, and a standard deviation per sex and years of work (this is just an example outlining grouping and sorting on two columns, not one as in the application dialog), how do I achieve it?
I can make one subtotal only, the second one seems to replace it, or I don’t understand the methodology.

Thank you.

Arranging data in rows can make things complicated, unless you make sure that each category of data (male age, female age, years of work) is in its own column. Then it is easy to do calculations on any column, or even part of it. I have spreadsheets with many columns and routinely do totals, sub-totals, averages, etc, on many of the different columns. Does this give you some ideas?