DATA Step, Macro, Functions and more

transpose and ascending display of brand name

Reply
Super Contributor
Posts: 648

transpose and ascending display of brand name

How to transpose and ascending display of brand name?

proc sort data= cmopdod_v2_qunty;
by outlet _Brand_Name;
run;
proc transpose data=cmopdod_v2_qunty out=wide2(drop=_name_);
id Brand_Name;
by outlet;
var quantity;

run;
Valued Guide
Posts: 632

Re: transpose and ascending display of brand name

Just to clarify, what about the result data set is not what you want? The variable names in the new data set will be placed on the PDV in ascending order. Using sashelp.shoes I tried your code:
[pre]proc sort data= sashelp.shoes out=shoes;
by subsidiary product;
run;
proc transpose data=shoes out=wide2(drop=_name_);
id product;
by subsidiary;
var sales;
run; [/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 124 views
  • 0 likes
  • 2 in conversation