DATA Step, Macro, Functions and more

PROC TABULATE

Reply
Frequent Contributor
Posts: 140

PROC TABULATE

[ Edited ]

Hi, 

 

I need my table output to read like this - 

 

01-Jun-15

 

Forbearance Cures

Self Cures

Total

bal_sasout

bal_prov

bal_sasout

bal_prov

bal_sasout

bal_prov

01-Jun-15

           

01-Jul-15

           

01-Aug-15

           

 

This is my code below, any idea how I format it in this way please as the code below produces this output?

 

  Self Cures Forbearance Cures Total Prov
£ £ £
Sum Sum Sum Sum
01AUG2015 482110391.82 62606689.82 544717081.64 545037076.64
01JUL2015 35684249.93 1820543.36 37504793.29 37527023.29
01JUN2015 33910675.76 805088.67 34715764.43 34732534.43

 

 

data work.steve;
set mortbib.mortgagebible_201506;
keep snap acc_status_1 bal_sasout bal_prov;
merge mortbib.mortgagebible_201506 mortbib.mortgagebible_201507 mortbib.mortgagebible_201508;
by mortgage;
where acc_status_1 in ("Forbearance Cures","Self Cures");
run;

 

proc tabulate data=steve missing;
class snap acc_status_1 /preloadfrmt order=data mlf;
var bal_sasout bal_prov;
table (snap=""),
(acc_status_1="" all="Total")*
(bal_sasout="£")
(bal_prov="Prov");
format acc_status_1;
run;

Super User
Posts: 17,842

Re: PROC TABULATE

I think it's the following: (untested as no sample data)

 

 

Table snap , acc_status*(bal_sasout*sum='sasout' bal_prov*sum='Prov') all='Total');
Super User
Posts: 5,085

Re: PROC TABULATE

I think we're all in the right playground.  I would try:

 

table snap=" ", (acc_status_1=" " all='Total') * (bal_sasout*sum=" " bal_prov*sum=" ");

Ask a Question
Discussion stats
  • 2 replies
  • 210 views
  • 1 like
  • 3 in conversation