I have a data set with time series data for the respective account numbers. I'm trying to select the first record for an account number (and the corresponding month field) that meets a particular condition. I was trying to achieve this objective with a proc sort statement but I was still getting duplicate account number observations. Here is the SAS code I wrote in order to execute this objective:
proc sort data=master_a out=master_b nodupkey;
by descending acctnum descending month;
where TDR=1 (1 meaning yes);
run;
I want to see one single record for each account number which will have the first occurence where TDR=1 .
Any assistance would be greatly appreciated. Thanks.
proc sort data=master_a out=master_b nodupkey;
by descending acctnum descending month;
where TDR=1 (1 meaning yes);
run;
I want to see one single record for each account number which will have the first occurence where TDR=1 .
Any assistance would be greatly appreciated. Thanks.