BookmarkSubscribeRSS Feed
Nietzsche
Lapis Lazuli | Level 10

Hi, just doing an example on pg 135 of the official specialist prep guide, after I run the code.

 

 

proc sort data=cert.usa out=temp2;
by manager jobtype;
run;

data budget2 (keep=manager jobtype payroll);
set temp2;
by manager jobtype;

if wagecat='S' then yearly=wagerate*12;
if wagecat='H' then yearly=wagerate*2000;
if first.jobtype then payroll=0;
payroll+yearly;
if last.jobtype;
run;


proc print data=budget2 noobs;
  by manager;
  var jobtype;
  sum payroll;
  where manager in ('Coxe', 'Delgado');
  format payroll dollar12.2;
run;

the result is this like. How can I get rid of the sum of sub-totals? I only want sub-total to show.

Nietzsche_0-1667796206435.png

 

 

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
1 REPLY 1
PeterClemmensen
Tourmaline | Level 20

Unfortunately, this is not possible. You would have to use some other reporting procedure like Proc Report or Proc Tabulate.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 228 views
  • 0 likes
  • 2 in conversation