BookmarkSubscribeRSS Feed
deleted_user
Not applicable
data tran
input acc date $ emi dpd;
cards;
101 nov08 90 0
101 dec08 80 1
101 jan09 45 0
102 nov08 89 0
102 dec08 89 1
102 jan09 78 2
run;


Hi i am having a dataset i wnat to transpose this but i wnat to transpose two variable .i wnat the output like this


acc nov08 dec08 jan09 nov_emi dec_emi jan_emi
101 90 80 45 0 1 0
102 89 89 78 0 1 2


i have done by transposing emi and then i have taken another datset and again traspose the dpd then i have merged it.

But i wnat this in Transpose
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Appears you have multiple, unique PREFIX= requirements for your transposed variables, therefore you must consider two PROC TRANSPOSE executions with a DATA step to MERGE the outputs together creating the columns you have listed.

Below is a link to one of several technical/conference papers found on the SAS support http://support.sas.com/ website to consider.

Scott Barry
SBBWorks, Inc.

Changing the Shape of Your Data: PROC TRANSPOSE vs. Arrays
Bob Virgile, Robert Virgile Associates, Inc.
http://www2.sas.com/proceedings/sugi24/Begtutor/p60-24.pdf

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 859 views
  • 0 likes
  • 2 in conversation