Hello,
I am using proc transpose to change data structure from wide to long.
It is working 100% and I also get a column called _LABEL_.
In this column (_LABEL_) I get the label values .
In my real code which contain many columns (150 columns) I perform also same proc transpose code but I don't get the _Label_ column.
May anyone explain why it can happen?
As I said I run same code (proc tranpose) but dont get _label_ column
data have;
label month='MM-YYYY' X='weight' y='height' Z='direction' R='revenue';
input month $ X Y Z R;
cards;
03-2023 10 20 30 40
04-2023 20 10 30 10
05-2023 40 30 20 20
;
Run;
proc transpose data=have out=want;
var _all_;
run;
Does your "real" data have any variables with labels?
Run proc contents on your dataset an in the section variables see if there are any labels.
If there is no label in the data proc transpose won't produce _label_ variable.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: