Hi Good Morning,
i have two columns in bank loan application data
in those columns
1.Customer_id
2.Year
NOTE:-Customer_ID is not in sequence and year is 2019 only not given mmddyyy format
so how to get very latest customer id for applying for loan
Assuming you have a Date variable
proc sql;
select *
from have
having date=max(date);
quit;
The max function should give you the latest date
if it is year , just take the last record of the dataset
HI Novinosrin
in that FY' column only 2019 not given date month
then how we get latest customer_id and also customer_id is not in sequence
@BrahmanandaRao - If all you have to work with is a customer ID and a year not a proper date with day, month and year then I'd say you can't do it.
proc sort
data=have
out=sorted
;
by customer_id year;
run;
data want;
set sorted;
by customer_id;
if last.customer_id;
run;
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →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.