Hello there,
I want to merge two columns so that they are shown as one when using PROC REPORT.
data have;
input condition $ Today Yesterday Diff;
datalines;
AAA 18 17 1
BBB 3524 3541 -17
CCC 773 781 -8
DDD 1721 1721 0
EEE 26 26 0
FFF 5 3 2
;
run;
PROC REPORT DATA=have;
COLUMN condition Today ('Yesterday' Yesterday Diff);
run;
The output of the above is:
What I want is:
Any ideas please?
Thanks
Define the columns without labels, and create "super-labels" for all:
PROC REPORT DATA=have;
COLUMN ("Condition" condition) ("Today" Today) ('Yesterday' Yesterday Diff);
define condition / "" display;
define today / "" display;
define yesterday / "" display;
define diff / "" display;
run;
Define the columns without labels, and create "super-labels" for all:
PROC REPORT DATA=have;
COLUMN ("Condition" condition) ("Today" Today) ('Yesterday' Yesterday Diff);
define condition / "" display;
define today / "" display;
define yesterday / "" display;
define diff / "" display;
run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.