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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.