Hi.
I think this syntax will give you your subgroup percentages:
proc tabulate data=class; where firstl in ("J","A"); class firstl sex age; var height; table (all="Total" firstl="") * (height="SUM"*sum="" height="PCT totalrække"*rowpctsum="" height="PCT subgroup"*pctsum<age all>="" ), sex=" " * (age="" all="I alt") all="Total" / box="Udfordring: PCT subgroup f*ialt=100% og m*ialt=100 "; run;
The clue is to use the subgroup variables for the denominator in the pctsum expression, which is "age all" in your example.
... View more