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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.