data have;
length ctr Status $25.;
input ctr cnt cnt2 Status;
return;
datalines;
4544 2 1 Paid
4544 3 1 Paid /*suppress the name paid but keep record*/
4544 4 1 Paid
4544 5 1 Paid
4465 10 1
4465 5 1
4475 1 0
4475 2 0 Paid
4475 3 1 Paid /*suppress the name paid but keep record*/
4476 5 2
4476 6 1 Paid
;
run;
Is there a way to keep all record however suppress the name "Paid" after it shows the first time? So in a series per ctr, if the status is "Paid", I want to see it displayed on the first instance only but keep all record.
Like this?
by CTR;
if first.CTR then PAID_FOUND=0;
if STATUS='Paid' then
if PAID_FOUND then STATUS=' '; else PAID_FOUND+1;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.