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.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 714 views
  • 0 likes
  • 2 in conversation