Hello, I work in sas eg and I have data of the following format
I'd like to create a final table, the following layout
I want columns that contain numeric data to be subcolumns of column MESEC
Can anyone tell me if something like this can be done in the SAS EG and if so, in what way?
Thanks!
If you are suppoed to deliver this to someone else - why not align with them?
And I agree with @SASJedi , your desired output looks more like a report than a data set (which is what it looks like in your project).
You can use PROC MEANS (or correponding task in EG) or PROC REPORT to create such a repot.
It appears that you want to create a report from the data that you have. If this is true, please supply an example input dataset - preferably as a DATA step that creates actual data - something like this:
data have;
input MSEC:$5. Number1 Number2;
datalines;
JAN04 1 2
JAN04 3 4
MAR04 5 6
MAR04 7 8
;
And an example of what you have tried so far - like this:
proc print data=have;
by MSEC;
run;
MSEC=JAN04
Obs | Number1 | Number2 |
---|---|---|
1 | 1 | 2 |
2 | 3 | 4 |
MSEC=MAR04
Obs | Number1 | Number2 |
---|---|---|
3 | 5 | 6 |
4 | 7 | 8 |
This will generally get you the help you need much more quickly.
This is my whole project
I'm not sure if There's anything else I need to deliver.
The end table, is a seemingly that I primarily delivered.
If you are suppoed to deliver this to someone else - why not align with them?
And I agree with @SASJedi , your desired output looks more like a report than a data set (which is what it looks like in your project).
You can use PROC MEANS (or correponding task in EG) or PROC REPORT to create such a repot.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.