Reformat a time-series table

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Reformat a time-series table

Dear all,

I have a table like this:

FundIDJan 2001Feb 2001Mar 2001
Fund 111.02.0

3.0

Fund 221.12.13.1
Fund 330.10.3

And would like to format it, so it looks like this:

FundIDDateReturns
Fund11Jan 20011.0

Fund1

1Feb 20012.0
Fund11Mar 20013.0

Fund2

2Jan 20011.1
Fund22Feb 20012.1
Fund22Mar 20013.1
Fund33Jan 20010.1
Fund33Feb 20010.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


Accepted Solutions
Solution
‎07-09-2014 02:22 PM
Super User
Posts: 19,865

Re: Reformat a time-series table

Take a look at proc transpose.

Not sure if this is what you need:

proc transpose data=have out=want;

by fund id;

run;

View solution in original post


All Replies
Solution
‎07-09-2014 02:22 PM
Super User
Posts: 19,865

Re: Reformat a time-series table

Take a look at proc transpose.

Not sure if this is what you need:

proc transpose data=have out=want;

by fund id;

run;

New Contributor
Posts: 2

Re: Reformat a time-series table

how come i forgot this!

need to pick up my little sas book again.

thanks a bunch, reeza!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 142 views
  • 0 likes
  • 2 in conversation