here is the transpose you are requesting:
data have;
input Cp_ID $
ID $
CONTENT $
ITEMCOUNT
LAST :date9. MODIFY $;
cards;
Cpid123. A2. One. 1864 20sep2018 17:54:02
Cpid123. A2. Two 20 20sep2018 17:36:09
Cpid123. A2. Five. 543 20sep2018 17:59:04
Cpid123. A2. Ten. 67 20sep2018 17:38:16
Cpid123. A2. One. 500 19sep2018 16:33:08
Cpid123. A2. Two 200 19sep2018 17:49:12
;
proc sort data=have;
by cp_id id last modify;
run;
proc transpose data=have out=want(drop=_name_);
by cp_id id last modify;
id content;
var itemcount;
format last date9.;
run;
proc print data=want;run;
a link to how to transpose data.
https://stats.idre.ucla.edu/sas/modules/how-to-reshape-data-long-to-wide-using-proc-transpose/
You can use the methods here to provide sample data in a format that others can easily use:
here is the transpose you are requesting:
data have;
input Cp_ID $
ID $
CONTENT $
ITEMCOUNT
LAST :date9. MODIFY $;
cards;
Cpid123. A2. One. 1864 20sep2018 17:54:02
Cpid123. A2. Two 20 20sep2018 17:36:09
Cpid123. A2. Five. 543 20sep2018 17:59:04
Cpid123. A2. Ten. 67 20sep2018 17:38:16
Cpid123. A2. One. 500 19sep2018 16:33:08
Cpid123. A2. Two 200 19sep2018 17:49:12
;
proc sort data=have;
by cp_id id last modify;
run;
proc transpose data=have out=want(drop=_name_);
by cp_id id last modify;
id content;
var itemcount;
format last date9.;
run;
proc print data=want;run;
Then make fake data or use a dataset from SASHELP.CLASS.
@Gil_ wrote:
Reeza i cant copy and post my actual code restrictions
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.