data t1 (drop=repdate); set t; currqtr=input(repdate, date9.); format currqtr date9.; run;
proc sql; create table t2 as select a.*,intnx("qtr",a.currqtr,-1,"e") as prevqtr format date9., coalesce (b.amount,0) as previoussale, coalesce ((a.amount-b.amount)/b.amount,0) as growth format=percentn8.1 from t1 as a left join t1 as b on a.id = b.id and intnx("qtr",a.currqtr,-1,"e") = b.currqtr order by id; quit;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.