Hello everyone,
For the following 2 reports , will PROC REPORT will be the best way OR can
I achieve through regular data steps , I haven’t used PROC Report so far
in SAS, can someone suggest some code help and reference for the same
Week Records Total Total Cumulative
records Records-File Percentage
0 3 3 33 9%
1 4 7 33 21%
2 2 9 33 27%
3 5 14 33 42%
4 12 26 33 79%
5 0 26 33 79%
***** 2nd report – reset for every week for the total , cumulative total **
P Week Week Total Total Total Cumulative
records records-cumulative Records-file Percentage
0 0 3 3 3 100%
1 0 3 3 7 43%
1 1 4 7 7 100%
2 0 3 3 9 33%
2 1 4 7 9 78%
2 2 2 9 9 100%
Thanks In Advance,
- Swamy
|
|
0
|
|
|
|
Reply
|
sasswamy (42)
|
1/6/2010 9:47:49 PM |
|
If you start with the raw data , have proc freq generate your results/
report.
Something like:
data t;
input week value;
cards;
1 3
1 3
1 4
1 5
1 6
2 4
2 6
3 10
3 121
3 122
3 124
;
run;
proc freq data=3Dt;
weight value;
table week;
run;
proc sort data=3Dt out =3D t_sorted; by week;run;
proc freq data=3Dt_sorted;
by week;
weight value;
table week;
run;
On Jan 6, 4:47=A0pm, sassw...@GMAIL.COM (SAS Swamy) wrote:
> Hello everyone,
>
> For the following 2 reports , will PROC REPORT will be the best way OR ca=
n
> I achieve through regular data steps =A0, I haven=92t used PROC Report so=
far
> in SAS, can someone suggest some code help and reference for the same
>
> Week Records =A0Total =A0 Total =A0 =A0 =A0 =A0 =A0 =A0Cumulative
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 records Records-File =A0P=
ercentage
> 0 3 =A0 =A0 =A0 =A0 =A0 =A0 3 33 9%
> 1 4 =A0 =A0 =A0 =A0 =A0 =A0 7 33 21%
> 2 2 =A0 =A0 =A0 =A0 =A0 =A0 9 33 27%
> 3 5 =A0 =A0 =A0 =A0 =A0 =A0 14 33 42%
> 4 12 =A0 =A0 =A0 =A0 =A0 =A0 26 33 79%
> 5 0 =A0 =A0 =A0 =A0 =A0 =A0 26 33 79%
>
> ***** 2nd report =96 reset for every week for the total , cumulative tota=
l **
>
> P Week Week Total =A0 Total =A0 =A0 =A0 =A0 =A0 =A0 =A0Total =A0 =A0 =A0 =
=A0Cumulative
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 records records-cumulative Records-file P=
ercentage
>
> 0 0 3 3 3 100%
>
> 1 0 3 3 7 43%
> 1 1 4 7 7 100%
>
> 2 0 3 3 9 33%
> 2 1 4 7 9 78%
> 2 2 2 9 9 100%
>
> Thanks In Advance,
> - Swamy
|
|
0
|
|
|
|
Reply
|
bigD
|
1/7/2010 3:06:38 PM
|
|