Hi Jerry, thanks for your answer, but there is not totally right:
proc summary output:
id
date
sum_mto
0
OCT14
0.2611745
0
NOV14
0.01
0
DEC14
0.08014064
0
FEB15
0.47
0
MAR15
0.12968991
0
APR15
0.37
0
MAY15
0.02316756
0
JUN15
0.05
0
JUL15
0.05017248
0
AUG15
0.26142127
0
SEP15
0.01620732
2
APR15
15.044794
2
JUN15
0.0317058
83
DEC14
300001.67
262
SEP15
31.0078
310
NOV14
3257
361
JUN15
15000
382
OCT14
20.5578741
526
MAR15
0.8397922
583
DEC14
0.00669792
584
SEP15
2.96077683
603
APR15
35.11013
603
JUN15
69.369564
609
OCT14
68.6342
693
JAN15
5.609508
693
JUN15
25.26848
710
JUN15
1734.04944
718
JUL15
0.00313578
727
MAY15
0.00316756
742
JAN15
23.25582
793
MAY15
0.00633512
881
SEP15
80.5151477
921
AUG15
12.31
935
MAY15
63.7552
948
DEC14
353.77335
948
MAR15
18.398973
I added var to your code, is it right? BUt, here is the problem, the output is strange:
proc transpose data=summ out=want(drop=_: ) prefix=mto_ ;
by id;
var id date;
run;
The output of this code:
id
mto_1
mto_2
mto_3
mto_4
mto_5
mto_6
mto_7
mto_8
mto_9
mto_10
mto_11
mto_12
0
0
0
0
0
0
0
0
0
0
0
0
.
0
19997
20028
20058
20121
20148
20179
20209
20240
20270
20301
20332
.
2
2
2
.
.
.
.
.
.
.
.
.
.
2
20179
20240
.
.
.
.
.
.
.
.
.
.
83
83
.
.
.
.
.
.
.
.
.
.
.
83
20058
.
.
.
.
.
.
.
.
.
.
.
262
262
.
.
.
.
.
.
.
.
.
.
.
262
20332
.
.
.
.
.
.
.
.
.
.
.
310
310
.
.
.
.
.
.
.
.
.
.
.
310
20028
.
.
.
.
.
.
.
.
.
.
.
361
361
.
.
.
.
.
.
.
.
.
.
.
361
20240
.
.
.
.
.
.
.
.
.
.
.
382
382
.
.
.
.
.
.
.
.
.
.
.
382
19997
.
.
.
.
.
.
.
.
.
.
.
526
526
.
.
.
.
.
.
.
.
.
.
.
526
20148
.
.
.
.
.
.
.
.
.
.
.
583
583
.
.
.
.
.
.
.
.
.
.
.
583
20058
.
.
.
.
.
.
.
.
.
.
.
584
584
.
.
.
.
.
.
.
.
.
.
.
584
20332
.
.
.
.
.
.
.
.
.
.
.
The date was transformed from a ddmmyy format, could it be the problem? And, you know why there are replicated ids? Thanks!
... View more