BookmarkSubscribeRSS Feed
deleted_user
Not applicable
In a new report I've just made, in a stored process, I want to summarize data per academic year, per campus, per ethnic group. Everything is working well, except for one little piece.

I am able to subtotal by campus, and get a subtotal line for the campus with no problem, that says, "Total CMP " ||college;

However, although I am also able to subtotal by year, the year itself does not show. It should say, Total " || YR_Range; but the computed value, YR_Range, does not show up. I get totals, but the value of the YR_Range does not show.
:
Here is the code I am using, and just can't figure out what causes the YR_Range value to not show.

break after flag/summarize;

compute after flag;
POSITION_EMPLOYEE_CLASS_DESC = "Total " || YR_Range;
yr_range = ' ';
college = ' ';
line ' ';
endcomp;

compute after college;
POSITION_EMPLOYEE_CLASS_DESC = "Total CMP " ||college;
college=' ';
yr_range = ' ';
endcomp;

break after college /summarize;
Rbreak after / summarize style={background=darkgray FONT_WEIGHT=BOLD };
compute after;
POSITION_EMPLOYEE_CLASS_DESC = "Grand Total " ;
line 'Total Empls. ' N;
endcomp;
run;

Can anyone explain why one value shows but the other one doesn't? Thanks so much in advance!
1 REPLY 1
deleted_user
Not applicable
Never mind....I got it fixed. Thank you.

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
  • 1 reply
  • 612 views
  • 0 likes
  • 1 in conversation