BookmarkSubscribeRSS Feed
wcpatton
Calcite | Level 5

Anyway to get my box= to display the _page_ value, followed by something?

I.e.

_page_ & "by State"

6 REPLIES 6
wcpatton
Calcite | Level 5

Responding to clarify:

So if my table had two class values (state, product), I want to end up with the box (or title, I suppose) saying [product] by State.

Reeza
Super User

What does your proc tabulate code look like?

wcpatton
Calcite | Level 5

options missing="0";

title;

ods html file=

"I:\RSD\Reports\CROSSPRODUCT\Portfolio RSR\Output\test.xls"

STYLE=nobreak;

options nomlogic nomprint;

proc tabulate data=rsr_combine missing;

class vintage product;

var ytd_nco balance delqbal annl_nco;

  tables  (all='Total Credit' product=''), (vintage='' all),

      ytd_nco  = "YTD Net Charge-off" *sum="" * f=dollar18.0

   ytd_nco  = "% of Total Net C/O" * reppctsum = "" * f=pctfmt16.4

   ytd_nco  = "% of Product Net C/O" * pctsum<vintage all> = "" * f=pctfmt16.4

   annl_nco = "% Annualized C/O Rate" * pctsum<balance> = "" * f=pctfmt16.3

   balance  = "Outstanding Balance" *sum="" * f=dollar18.0

   balance  = "% of Total O/S" * reppctsum = "" * f=pctfmt24.4

   balance  = "% of Product O/S" * pctsum<vintage all> = "" * f=pctfmt16.4

   delqbal = "Delq Bal" *sum="" * f=dollar18.0

   delqbal  = "% of Total Delq" * reppctsum = "" * f=pctfmt24.4

   delqbal  = "% of Product Delq" * pctsum<vintage all> = "" * f=pctfmt16.4

   delqbal = "Delq Rate as of &month &yyyy" * pctsum<balance> = "" * f=pctfmt36.4/

   box=???;

   title ;

   format vintage vint.;

run;

ods html close;

wcpatton
Calcite | Level 5

Product has values like Auto, HELOC, etc.

Ideally, for this table, my box or title would say

Auto by Vintage

HELOC by Vintage

Mortgage by Vintage

etc.

Reeza
Super User

I was hoping the #byval would work but it doesn't seem to Smiley Sad

Or I did something wrong.

proc sort data=sashelp.shoes out=shoes;

by region;

run;

proc tabulate data=shoes;

by region;

class product subsidiary;

var sales inventory;

table product*subsidiary, sales='Sales $'*sum=''*f=dollar12. inventory="Inventory $"*sum=""*f=dollar12./box='#byval(region)';

run;

wcpatton
Calcite | Level 5

#byval works in a title statement, but not in box=   :smileyangry:

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 6 replies
  • 1439 views
  • 0 likes
  • 2 in conversation