BookmarkSubscribeRSS Feed

Hi, 

 

I need my table output to read like this - 

 

01-Jun-15

 

FC

SC

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?

 

  SC FC Total Prov
£ £ £
Sum Sum Sum Sum
01AUG2015 22222221.82 222222222.82 222222222.64 222222222.64
01JUL2015 22222222.93 222222222.36 222222222.29 222222222.29
01JUN2015 22222222.76 2222222222.67 222222222.43 2222222222.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 ("FC","SC");
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;

3 REPLIES 3
Reeza
Super User

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');
Astounding
PROC Star

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=" ");

Reeza
Super User

@anonymous_user Did you just edit a post from more than a year ago. Is this even the same question and do you still need an answer?

 

I would suggest creating a new question and linking back to this one, rather than resurfacing an old question. 

 

Editing your post isn't helpful either because then we can't see the history or know what you originally asked. It's better to add it in as a reply. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1387 views
  • 1 like
  • 3 in conversation