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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.