BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

In this proc report example I want that  in last row under Y column will be empty cell (and not 150 value)

What is the way to do it please?

I want also that in last row under "t" column will written "All" and not empty cell 

 

data tbl1;
input ID t $ X Y;
cards;
1 a 10 150
2 a 20 150
3 a 30 150
4 b 40 150
5 b 50 150
;
run;

proc report data=tbl1;
columns  t x y ;
define t/group;
define x/sum;
define y/max;

rbreak after /summarize ol ul;

run;
1 REPLY 1
Kurt_Bremser
Super User

Then why do you tell proc report to calculate a max, when you don't want it?

Try this:

proc report data=tbl1;
columns  t x y ;
define t/group;
define x/sum;
define y/display;

rbreak after /summarize ol ul;
compute after;
  t = 'Total';
endcomp;

run;

Result:

t                 X          Y
a                10        150
                 20        150
                 30        150
b                40        150
                 50        150
--------  ---------           
Total           150           
--------  ---------           

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 583 views
  • 0 likes
  • 2 in conversation