Hi all, I want to create report for 12 months but I will have data to up to current month only. so I want to populate default value for the months which does not have data.
I want something like this :
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
A 2 3 4 5 6 0 0 0 0 0 0 0
B 2 3 4 5 6 0 0 0 0 0 0 0
C 2 3 4 5 6 0 0 0 0 0 0 0
D
E
F
the A B C D E F are the some names
but I have data something like this
SRNo Account Month Init
1 0001 jan 1/23/23
2 0456 feb 2/15/23
3 0567 feb 2/27/23
4 0012 mar 3/3/23
5 0034 apr 4/5/23
6 0009 may 5/18/23
Please help me.
Your question does not provide enough clues to be able to provide an answer. Please use your creativity and produce a better question with some sample code that clarifies your question. You can start with this:
data have;
input idnumber account $ month $ init mmddyy8.;
format init date9.;
datalines;
1 0101 jan 1/23/23
2 0306 feb 2/15/23
3 0405 mar 3/3/23
run;
data want;
set have;
.....
run;
the A B C D E F are the some names
which do not correspond in any way to your input data, so we can't possibly help you produce such a table from this input data. Also we don't know what the numbers in the cells are. A better explanation is needed.
If you want zeros, you can add zeros for the missing months into your input data.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.