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

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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