BookmarkSubscribeRSS Feed
Sukhi1
Calcite | Level 5

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. 

 

2 REPLIES 2
JosvanderVelden
SAS Super FREQ

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;
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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 lock in 2025 pricing—just $495!

Register now

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1012 views
  • 0 likes
  • 3 in conversation