BookmarkSubscribeRSS Feed
Daily1
Quartz | Level 8
proc report data=sashelp.shoes nowd;
	column ('region'  region ) ('Product'  Product) ('Subsidiary'  Subsidiary);
	define Region / '' order=data;
	define Product / '' order=data;
	define Subsidiary / '' order=data;
run;

i have this output

Daily1_0-1657280057839.png

i want this type of output

 

Daily1_1-1657280940430.png

 

 

1 REPLY 1
Ksharp
Super User
proc sort data=sashelp.shoes out=have;
by Region Product Subsidiary;
run;
data have;
 set have;
 if mod(_n_,11)=1 then group+1;
run;
proc report data=have nowd;
	column group ('region'  region ) ('Product'  Product) ('Subsidiary'  Subsidiary);
	define group/group noprint;
	define Region / '' order=data;
	define Product / '' order=data;
	define Subsidiary / '' order=data;
	compute before group/style={just=l fontweight=bold};
      temp=cats('report',group);
	  line temp $20.;
	endcomp;
run;

Ksharp_0-1657284466341.png

 

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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