Hi
In future, can you post test data as a datastep. You can use a simple tranpose on the data, and then process that into what you want:
data have;
input Channel1 $ report_dt_p1 $ Metric $ count gross_amt gross_amt_avg fico high_risk $ fico_lt660 ltv_gt90;
datalines;
Emerging_Banker Mar2015 STM 268 99.39263 370.868 773.0039 High_Risk_Categories 0 0.01701761
Emerging_Banker Apr2015 STM 206 74.67056 362.4784 770.9701 High_Risk_Categories 0.00691839 0.037584412
;
run;
proc transpose data=have out=want;
id report_dt_p1;
run;
data want;
set want;
length test $50;
array month{2} $50.;
select(_name_);
when('count') do;
test="Count";
month{1}=strip(put(mar2015,best.));
month{2}=strip(put(apr2015,best.));
end;
when('gross_amt') do;
test="Gross Amt";
month{1}=cats(put(ceil(mar2015),best.),"M");
month{2}=cats(put(ceil(apr2015),best.),"M");
end;
otherwise;
end;
I have only done a few of the conversions for you to give you an idea on how to go. Obviously you can shrink the code a bit by arraying the months for example.
... View more