When someone mentions 'pivot table' in SAS i always think of PROC TABULATE. The following code should get close to what you want. The multilabel format allows tabulate to combine the CLASS levels and the NOTSORTED along with the PRELOADFMT preserves the format order. For simplicity I took the text date and built a SAS date so that a data format could be applied.
proc format;
value $txncode (multilabel notsorted)
'F','L' = 'FL'
'F' = 'F'
'L' = 'L';
run;
data Txn(keep=date txnamount txntype);
input Year Month $ TxnAmount TxnType $;
dtstr = cats('01',month,year);
date = input(dtstr,date9.);
datalines;
2017 Jan 100 F
2017 Jan 100 L
2017 Feb 100 F
2017 Feb 200 L
2017 Feb 300 F
2017 Feb 400 L
run;
proc tabulate data=txn;
class date / order=internal;
class txntype/mlf preloadfmt order=data;
var txnamount;
table txntype=' ',
date=' '*txnamount=' '*sum=' '/
box='Type';
format txntype $txncode.
date monyy7.;
run;
... View more