Professional SAS Programming Secrets

PHOTO EMBED

Wed Dec 04 2024 17:00:52 GMT+0000 (Coordinated Universal Time)

Saved by @VanLemaime

*
  Professional SAS Programming Secrets
  Program 5g
  PCTCHG function
*;
proc fcmp outlib=work.cmp.business_math;
function pctchg(x1, x2);
   if (not x1) or missing(x2) then percent = .;
   else percent = (x2/x1 - 1)*100;
   return (percent);
   endsub;
quit;
content_copyCOPY

https://www.globalstatements.com/secret/3/5g.html