Hi
If it is for printed output, you can use Proc REPORT and the CALL DEFINE routine to achive this, see example below.
data have;
input
Indicator
Score
;
cards;
1 0.1286
2 1.1096
3 4.853
4 0.3064
;
proc report data=have;
column indicator score _dummy;
define indicator / display;
define score / display;
define _dummy / computed noprint;
compute _dummy;
if indicator = 3 then do;
call define("score", "format", "8.4");
end;
else do;
call define("score", "format", "percentn9.2");
end;
endcomp;
run;
... View more