* 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;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter