Hi I used the tips from Cynthia and created some sample data and a Proc Report, it should give you a good start: data someData; infile cards dsd dlm="," missover; input countryGroup : $32. Country : $32. target : 8. Day : 8. dayValue : 8. ; cards; NorthAmerica,Canada,200,1,310 NorthAmerica,Canada,200,2,120 NorthAmerica,USA,250,1,10 NorthAmerica,USA,250,2,320 ; proc report data=someData nowindows; column countryGroup Country target day, dayValue _dummy; define countryGroup / group; define country / group; define target / analysis mean; define day / across; define dayValue / analysis sum; define _dummy / computed; compute _dummy /; * depends on the number of days; array myDays{*} _c4_ _c5_; * we are in a plain data line; if missing(_break_) then do; do i = 1 to dim(myDays); if myDays{i} > target.mean then do; call define(vname(myDays{i}), "style", "style={background=cx997086}"); end; end; targetTotal + target.mean; end; * we are in a summary line; if upcase(_break_) = "COUNTRYGROUP" then do; countryGroup = catx(" ", countryGroup, "Total"); target.mean = targetTotal; end; endcomp; break after countryGroup / summarize; run; Bruno
... View more