3
我寫的代碼,以顯示與PROC報告下列記錄。我想用紅色突出顯示每行的最大數量。我已經嘗試了代碼,但突出顯示了不同的值。請在下面的代碼中提供更正,以顯示正確突出顯示的值。SAS PROC報表樣式
data records;
input a1 a2 a3 a4 a5;
cards;
37 95 80 52 85
94 . 7 10 14
64 5 71 14 92
. 55 38 . 46
;
run;
proc report data=records nowd;
column a1 a2 a3 a4 a5;
define a1/display;
define a2/display;
define a3/display;
define a4/display;
define a5/display;
compute a1;
if a1=Max(a1,a2,a3,a4,a5) then call define('a1','style','style={foreground=white background=red}');
endcomp;
compute a2;
if a2=Max(a1,a2,a3,a4,a5) then call define('a2','style','style={foreground=white background=red}');
endcomp;
compute a3;
if a3=max(a1,a2,a3,a4,a5) then call define('a3','style','style={foreground=white background=red}');
endcomp;
compute a4;
if a4=max(a1,a2,a3,a4,a5) then call define('a4','style','style={foreground=white background=red}');
endcomp;
compute a5;
if a5=max(a1,a2,a3,a4,a5) then call define('a5','style','style={foreground=white background=red}');
endcomp;
run;
非常感謝... –