BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
TobbeNord
Obsidian | Level 7

My code looks as following

 


proc tabulate data=invand(where=(fodelselandgrupp^='Sverige')) order=formatted missing;
title 'GFB och ålder inkl missing';
class gfb alderinv kon ;
table (kon='' all='Totalt')*(alderinv='' all='Alla'),(gfb='GFB' all='Alla')*(N='' rowpctn='Row %' pctn<kon all>='Col %')/box= 'Ålder vid invandringsår';
format alderinv aldkat. gfb gfbgrupp. kon $kon.;
run;
title;

 

With output attached 

 
I want the column percentage to sum up into 100% witihin the variable "kon", (witihin "Kvinnor" and "Män").

 

How can I do that?

 
1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @TobbeNord,

 

Please replace

pctn<kon all>

with

pctn<alderinv all>

and check if the new results meet your expectations.

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hello @TobbeNord,

 

Please replace

pctn<kon all>

with

pctn<alderinv all>

and check if the new results meet your expectations.

TobbeNord
Obsidian | Level 7
Great!! Of course! Stupid of me.