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):
HitmonTran_0-1608167128115.png
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):
HitmonTran_0-1608167128115.png
CFC_SAS_Communities_400x225.jpg
It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.
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.