BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Nishant_saxena
Calcite | Level 5

Hi all,

I need help in customizing my report generated by using proc report.

 

code I tried is:


proc means data=olympics_digi_cleaned sum descending ;
class _probability___;
var Total_Media_value;
run;

 

Output is attached in attachments.

 

 

What I want is :

(1)   To display Prob_Digi in place of _probablity___  as my column name

(2)    to display all the data in reverse order i.e _probablity 100 will be my first observation and 0 will be my last observation

(3)   To display sum o all observation in sum column at last

(4)   At last I also want to add a column that contain the product of _probablity___ and sum.

 


output.PNG
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

All of this should be easy to do if you output the results of PROC MEANS to a SAS data set, and then perform the modificaitons you want on the PROC MEANS output using a SAS data step or another PROC, then do a PROC PRINT or PROC REPORT.

 

To output the data from PROC MEANS to a SAS data set named _results_, use this code as the last command of PROC MEANS (just above the run; command)

 

output out=_results_ sum=;

 

--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

All of this should be easy to do if you output the results of PROC MEANS to a SAS data set, and then perform the modificaitons you want on the PROC MEANS output using a SAS data step or another PROC, then do a PROC PRINT or PROC REPORT.

 

To output the data from PROC MEANS to a SAS data set named _results_, use this code as the last command of PROC MEANS (just above the run; command)

 

output out=_results_ sum=;

 

--
Paige Miller
Nishant_saxena
Calcite | Level 5

hi there by inserting this line:

output out= _result_ sum=;

eveything is done 

But how to display my table in reverse order

i.e. 100 will be my first observation and 10 will be my last observation??

PaigeMiller
Diamond | Level 26

PROC SORT

--
Paige Miller

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