Hi All,
I have a data be like
Data Da1;
input Id Drug$ Dose;
datalines;
101 Da 200
101 Da 200
101 Da 200
102 Da 200
102 Da 200
102 Da 200
103 Da 200
103 Da 200
;run;
I am expecting the output be like:
Id F1
------------
101 Y
102 N
103 Y
Please help me out in the program to get an output.
Thank you
Please explain how the column named F1 in the output is computed from the data you show.
@saitejaguduru97 wrote:
We have to create F1 row.
I asked you to explain how the column F1 is calculated. You have not explained this.
The sample data you provide is identical for Drug and Dose in all rows.
What could possibly be the logic one would need to implement to derive a column F1 from this data that gets N for id 102 but Y for the other two id's.
Please explain the logic to be used. ...and likely provide better sample data that matches the desired result once logic applied.
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.