Hello,
I am a new SAS user.
I want to create a new column showing the non-missing value.
However, when all the column values are missing, the output column will show a missing value too.
I have the following dataset:
data have;
input Company_ID $4. Date1 Date2 Date3 Date4;
informat Date1 Date2 Date3 Date4 date9.;
format Date1 Date2 Date3 Date4 date9.;
cards;
1210 31mar2009 . . .
1210 . 30jun2009 . .
1210 . . 30sep2009 .
1210 . . . .
1210 . . . 31mar2009
;
run;
I am expecting the following output:
Company_ID | Date1 | Date2 | Date3 | Date4 | Date_New |
1210 | 31-Mar-09 | . | . | . | 31-Mar-09 |
1210 | . | 30-Jun-09 | . | . | 30-Jun-09 |
1210 | . | . | 30-Sep-09 | . | 30-Sep-09 |
1210 | . | . | . | . | . |
1210 | . | . | . | 31-Mar-09 | 31-Mar-09 |
Thank you in advance for your kind support!