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.
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 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.