will give this a try... I separated worksheets for each population and the formatting is different for all 4 worksheets. proc report data=Dashboard_&filedate.(drop=rate rate_pw rate_f rate_py) split='#' style(header)=[background=&hdr. color=&fnt.] style(lines)={just=l font_weight=bold} ; where population="&pop."; columns ("&pop1. Weekly Hybrid Rates Dashboard" (population description measurekey denom_f numer_f rate_f /*rate_i*/)) ("QMRM Data &filedate." (denom mrnum numer rate)) ("&curyr. Cut Points" (cutpt1 cutpt2 cutpt3 cutpt4)) ('Num Hits Needed to Reach' (hits1 hits2 hits3 hits4)) ("QMRM Data &pfiledat. " (denom_pw mrnum_pw numer_pw rate_pw rate_chg_pw)) ("QMRM Data &pywk." (denom_py mrnum_py numer_py rate_py rate_chg_py)) line0 line1 line2 line3 line4 line5; define population / order noprint; define description / display style(header)= [background=gray color=White] "MY&curyr. Measure Description"; define measurekey / display style(header)= [background=gray color=White] 'Measure#Key'; define denom_f / analysis noprint; define numer_f / analysis noprint; define rate_f / computed format=percent8.2 style(header)= [background=gray color=White] "MY&pmyr.#Reported#Rate"; *define rate_i / computed format=percent8.2 style(header)= [background=gray color=White] "Initial#Admin#Rate#MY&cmyr"; define denom / analysis format=8. style(header)= [background=gray color=White] 'Den'; define mrnum / analysis format=8. style(header)= [background=gray color=White] 'Med Rec#Num'; define numer / analysis format=8. style(header)= [background=gray color=White] 'Num'; define rate / computed format=percent8.2 style(header)= [background=gray color=White] 'Rate'; define cutpt1 / analysis format=percent8.2 style(header)= [background=gray color=White]; define cutpt2 / analysis format=percent8.2 style(header)= [background=gray color=White]; define cutpt3 / analysis format=percent8.2 style(header)= [background=gray color=White]; define cutpt4 / analysis format=percent8.2 style(header)= [background=gray color=White]; define hits1 / analysis format=8. style(header)= [background=gray color=White] '2_Stars'; define hits2 / analysis format=8. style(header)= [background=gray color=White] '3_Stars'; define hits3 / analysis format=8. style(header)= [background=gray color=White] '4_Stars'; define hits4 / analysis format=8. style(header)= [background=gray color=White] '5_Stars'; define denom_pw / analysis format=8. style(header)= [background=gray color=White] 'Den'; define mrnum_pw / analysis format=8. style(header)= [background=gray color=White] 'Med Rec#Num'; define numer_pw / analysis format=8. style(header)= [background=gray color=White] 'Num'; define rate_pw / computed format=percent8.2 style(header)= [background=gray color=White] "Prior#Week#MY&cmyr.#Rate"; define rate_chg_pw / computed format=percent8.2 style(header)= [background=gray color=White] "Chg from#MY&cmYR.#Prior#Week"; define denom_py / noprint; define mrnum_py / noprint; define numer_py / noprint; define rate_py / computed format=percent8.2 style(header)= [background=gray color=White] "Prior Year#MY&pmyr. Rate#Same Week"; define rate_chg_py / computed format=percent8.2 style(header)= [background=gray color=White] "Chg from#MY&pmyr.#Same#Week"; compute rate_f; rate_f=numer_f.sum/denom_f.sum; if numer_f.sum/denom_f.sum le numer.sum/denom.sum then call define(_col_,'style', "style=[background=&hdr. font_weight=bold]"); else call define(_col_,'style', "style=[background=&tab.]"); endcomp; compute rate; rate=numer.sum/denom.sum; if numer.sum/denom.sum ge numer_f.sum/denom_f.sum then call define(_col_,'style', "style=[background=&hdr. font_weight=bold]"); else call define(_col_,'style', "style=[background=&tab.]"); endcomp; compute hits1; if hits1.sum=0 then call define(_col_,'style', 'style=[background=dark gray]'); endcomp; compute hits2; if hits2.sum=0 then call define(_col_,'style', 'style=[background=dark grey]'); endcomp; compute hits3; if hits3.sum=0 then call define(_col_,'style', 'style=[background=dark grey]'); endcomp; compute hits4; if hits4.sum=0 then call define(_col_,'style', 'style=[background=dark grey]'); endcomp; compute rate_pw; rate_pw=numer_pw.sum/denom_pw.sum; if numer_pw.sum/denom_pw.sum le numer.sum/denom.sum then call define(_col_,'style', "style=[background=&hdr. font_weight=bold]"); else call define(_col_,'style', "style=[background=&tab.]"); endcomp; compute rate_chg_pw; rate_chg_pw=(numer_pw.sum/denom_pw.sum) - (numer.sum/denom.sum); endcomp; compute rate_py; rate_py=numer_py.sum/denom_py.sum; if numer_py.sum/denom_py.sum le numer.sum/denom.sum then call define(_col_,'style', "style=[background=&hdr. font_weight=bold]"); else call define(_col_,'style', "style=[background=&tab.]"); endcomp; compute rate_chg_py; rate_chg_py=(numer_py.sum/denom_py.sum) - (numer.sum/denom.sum); endcomp; compute after population; if population in ('SCO','NHMCR') then do; text1 = "^{style[background=black foreground=white] * = STARS Clinical Outcomes Measure} (*ESC*){NEWLINE}" ; lg1 = length(text1); text2 = "^{style[background=grey color=black] * CDC Poor Control is an inverse measure - lower is better} (*ESC*){NEWLINE}"; lg2 = length(text2); text3 = "^{style[background=yellow color=black] Dark yellow indicates current rate is better than MY 2022 final rate.} (*ESC*){NEWLINE}"; lg3 = length(text3); text4 = "^{style[color=black] Bold measures - triple weighted } (*ESC*){NEWLINE}"; lg4 = length(text4); text5 = "^{style[color=black] TRC - 2 Star weights - Average of submeasure and Med Rec} (*ESC*){NEWLINE}"; lg5 = length(text5); end; else if population in ('MH','NH') then do; text1 = "^{style[color=black] *-Triple weighted measure(*ESC*){NEWLINE}"; lg1 = length(text1); text2 = "^{style[color=black] Withhold measure} (*ESC*){NEWLINE}"; lg2 = length(text2); text3 = "^{style[color=black] } (*ESC*){NEWLINE}"; lg3 = length(text3); text4 = "^{style[color=black] } (*ESC*){NEWLINE}"; lg3 = length(text4); text5 = "^{style[color=black] } (*ESC*){NEWLINE}"; lg5 = length(text5); end; else do; text1 = ' '; lg1 = length(text1); text2 = ' '; lg2 = length(text2); text3 = ''; lg3 = length(text3); text4 = ''; lg3 = length(text4); text5 = ''; lg5 = length(text5); end; line text1 $varying. lg1; line text2 $varying. lg2; line text3 $varying. lg3; line text4 $varying. lg4; line text5 $varying. lg5; endcomp; run;
... View more