Hi,
New to SAS. I need to create a table, that shows total count across all variables and across all obs. I am stuck on how to get that, thanks.
data (where Age_Group 1= 18-50yo, Age_Group 2=51-65yo , Age_Group 3= 65+yo):
Site Age Age_Group
1 18 1
1 18 1
1 18 1
2 20 1
2 55 2
2 55 2
3 55 2
3 70 3
3 75 3
want (table shell):
Have you tried using PROC TABULATE? That will likely get you the closest to the image shown.
@HitmonTran wrote:
Hi,
New to SAS. I need to create a table, that shows total count across all variables and across all obs. I am stuck on how to get that, thanks.
data (where Age_Group 1= 18-50yo, Age_Group 2=51-65yo , Age_Group 3= 65+yo):
Site Age Age_Group
1 18 1
1 18 1
1 18 1
2 20 1
2 55 2
2 55 2
3 55 2
3 70 3
3 75 3
want (table shell):
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.