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;
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 -------- ---------
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.