BookmarkSubscribeRSS Feed
Nasser_DRMCP
Lapis Lazuli | Level 10
PROC REPORT DATA = work.T5 nowd ;
	column  GENERATION periode_month , (mnt_1 mnt_2)     ;
	define GENERATION / group  ; 
	define periode_month / across ''  ;
	define mnt_1  /  'indic1' f=12.2 ;
	define mnt_2/ 'indic2  f=12.2  ;
	title ;
  	RUN ;

Good Morning,

 

 

by launching this code, in the output result the 2 indicators are in columns like photo1

I would like indicators on two lines like photo2photo1.PNGphoto2.PNG

 

thanks a lot in advance for your help

regard,

Nasser

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Do your calculation in a simple datastep before the proc report, then proc report your data.  Proc report, whilst having some functionality regarding sums isn't the best tool for the job.  As for exact code, no idea what the data originally looks like so cant really say.

Ksharp
Super User
Better post some data to test code. and Better post it at REPORT forum. @Cynthia is there.


Tom
Super User Tom
Super User

Looks like you need to convert your data into multiple rows instead of multiple columns.

data have ;
  do generation=2008,2009;
    do month='201601','201602';
      do indication='indict1','indict2';
      input amount @@;
      output;
      end;
    end;
  end;
cards;
3687 345 3590 4058 4681 637 455 4118
;

proc report ;
  column generation indication amount,month ;
  define generation / group ;
  define indication / group ;
  define month / across ;
  define amount / sum ' ' ;
run;

image.png

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 578 views
  • 0 likes
  • 4 in conversation