Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Pivot SAS dataset Ideas

Pivot SAS dataset Ideas

Pivot SAS dataset Ideas

proc sql;
create table test as
select ln_no,thismonth,lastmonth
from mytest;

sample output
ln_no thismonth lastmonth
1123 current 30 day
1344 30 day current
24333 current 60 day
2445 current 60 day

I need to pivot the data using thismonth as the row, lastmonth as the colum and a count of the variable elements based on the loan numbers.
Desired output

Status Current 30Day 60Day Totals
Current 1 1
30 Day 1 1
60 Day 2 2

I know how to pivot the data in excel but have trouble with proc transpose in sas. Alternately if there is a way to export the raw data to excel, create the pivot table, then import it into sas, let me know. By the way I am using Enteprise Guide 5.1. I see a transpose feature there and have tried to experiment with it

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close