BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RAVI2000
Lapis Lazuli | Level 10

Hello everyone,

 

how to obtain single record per subject?

 

I tried below code:

 

proc transpose data = have;
by param;
var aval;
id trta;
run;

Its giving me an error.

 

Error: ID value "T1" occurs twice in the same by group.

Error: ID value "T1" occurs twice in the same by group.

Error: ID value "T2" occurs twice in the same by group.

Error: ID value "T1" occurs twice in the same by group.

Error: ID value "T2" occurs twice in the same by group.

Error: ID value "T2" occurs twice in the same by group.

Error: All BY groups were bad.

1 ACCEPTED SOLUTION

Accepted Solutions
1 REPLY 1
PaigeMiller
Diamond | Level 26

Use

 

by subjid;
--
Paige Miller
How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1149 views
  • 0 likes
  • 2 in conversation