@Cynthia_sas,
Thank you very much for your detailed information and sorry for my late response.
Actually, I want to change my sample data set, what if my data set is as below, how can I give the color to the Value column. I want to do with PROC FORMAT, because the number of columns can be change. Of course, I want to do with PROC FORMAT if it is possible.
At the following example, I tried to use @Jagadishkatam example but I got an error like ->ERROR: For format TEMP, this range is repeated, or values overlap: 0.5-0.5. I didn't understand the reason
But the "Results" tab show what I want, I just need to add colors into the "Value" column by using "Color" column values.
If PROC FORMAT is not proper for my purpose, I'm okay to listen your methods.
Thank you very much
Data Have;
Length Target $ 32 Value 8 Value2 8 Color $ 32 Dataset $ 32;
Infile Datalines Missover;
Input Target Value Value2 Color Dataset;
Datalines;
Variable1 0.5 0.4 Red Data1
Variable2 0.3 0.2 Red Data1
Variable3 0.7 0.75 Yellow Data1
Variable1 0.4 0.45 Red Data2
Variable2 0.8 0.85 Green Data2
Variable3 0.5 0.6 Red Data2
Variable1 0.4 0.3 Red Data3
Variable2 0.9 0.8 Green Data3
Variable3 0.3 0.25 Red Data3
;
Run;
data fmt;
set have;
fmtname='temp';
start=value;
label=color;
type='N';
run;
proc format cntlin=fmt fmtlib;
run;
Proc Report Data=Have out=test nowd;
Column Target Dataset,(Value Value2 );
Define Target / Group ;
Define Dataset / Across style={background=temp.};
Define Value / Analysis;
Define Value2 / Analysis;
Run;
Thank you,
... View more