Dear all,
I have a table like this:
| Fund | ID | Jan 2001 | Feb 2001 | Mar 2001 |
|---|---|---|---|---|
| Fund 1 | 1 | 1.0 | 2.0 | 3.0 |
| Fund 2 | 2 | 1.1 | 2.1 | 3.1 |
| Fund 3 | 3 | 0.1 | 0.3 |
And would like to format it, so it looks like this:
| Fund | ID | Date | Returns |
|---|---|---|---|
| Fund1 | 1 | Jan 2001 | 1.0 |
Fund1 | 1 | Feb 2001 | 2.0 |
| Fund1 | 1 | Mar 2001 | 3.0 |
Fund2 | 2 | Jan 2001 | 1.1 |
| Fund2 | 2 | Feb 2001 | 2.1 |
| Fund2 | 2 | Mar 2001 | 3.1 |
| Fund3 | 3 | Jan 2001 | 0.1 |
| Fund3 | 3 | Feb 2001 | 0.3 |
Of course, I have close to 10,000 funds and the return date (months) are in hundreds.
Any thoughts are greatly appreciated.
Thanks
Daniel
Take a look at proc transpose.
Not sure if this is what you need:
proc transpose data=have out=want;
by fund id;
run;
Take a look at proc transpose.
Not sure if this is what you need:
proc transpose data=have out=want;
by fund id;
run;
how come i forgot this!
need to pick up my little sas book again.
thanks a bunch, reeza!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.