Question/Solution is same as here:
https://communities.sas.com/t5/SAS-Procedures/Number-of-Claims-by-quarter-of-year/m-p/365886#M64790
I merged the threads with an identical question. @GKati: please keep your questions in one thread in the future. We're not in the business of reinventing wheels.
You have missing value in it, so you got 'spec.' .
what variable name you want to assign to missing value ?
I thought you were trying to count the number of clients? If so, why is that in your table statement?
If it's just counts use proc freq.
Proc freq data=have noprint;
Table year*quarter*specialty / out = summary;
Run;
Proc transpose data=summary out=want prefix=spec_;
By year quarter;
Var count;
Id specialty;
Run;
If you do want client level summary include it in the TABLE statement and BY statement for the TRANSPOSE.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.