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:

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2573 views
  • 0 likes
  • 2 in conversation