The SAS Output Delivery System and reporting techniques

displaying a column in ascending sequence in proc report

Reply
N/A
Posts: 0

displaying a column in ascending sequence in proc report

input id cwk :$4. wk day x y;
datalines;
1 sc 0 1 11 10
1 wk1 1 1 12 20
1 wk1 1 2 23 34
1 wk10 10 1 13 30
1 wk10 10 2 33 45
1 wk4 4 1 14 40
2 sc 0 1 13 15
2 sc 0 2 23 43
2 wk1 1 1 14 25
2 wk1 1 2 24 35
2 wk10 10 1 15 35
2 wk10 10 2 45 56
2 wk3 3 1 16 45
2 wk3 3 2 36 46
2 wk4 4 1 17 55
;
I have above data and written the following code
proc sort data=test;
by week;
run;
proc report data=test(drop=wk) nowd;
columns cwk day id,(x y);
*define wk/group order=data noprint;
define cwk/group "week";

define day/group "Day";
define id/across "ID";
define x/ "X";
define y/ "Y";
run;
getting output as follows
ID
1 2
week Day X Y X Y
sc 1 11 10 13 15
2 . . 23 43
wk1 1 12 20 14 25
2 23 34 24 35
wk10 1 13 30 15 35
2 33 45 45 56
wk3 1 . . 16 45
2 . . 36 46
wk4 1 14 40 17 55
but not getting the output in asending sequence of the week.
but I want to display wk10 after wk3, wk4. I mean I just want to display week in asending sequence.
N/A
Posts: 0

Re: displaying a column in ascending sequence in proc report

It has been resolved, small mistake. Thank you
Ask a Question
Discussion stats
  • 1 reply
  • 111 views
  • 0 likes
  • 1 in conversation