I have a dataset with thousands of datalines that I need counted. Here's an example of what I'm trying to do:
dataset exampe1:
eric | a |
eric | b |
eric | a |
eric | b |
eric | a |
sara | b |
sara | c |
sara | b |
I would like to take dataset example1 and create this output:
# of times a | # of times b | # of times c | |
eric | 3 | 2 | 0 |
sara | 0 | 2 | 1 |
Thank you!
Thanks so much! You're awesome!
proc tabulate data=have;
class name grade;
table name, grade*n='';
run;
If you want a report and do not need a dataset.
Thank you
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.