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.
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=;
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=;
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??
PROC SORT
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.