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;
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: