BookmarkSubscribeRSS Feed
kuridisanjeev
Quartz | Level 8

Dear all,

namesubject1subject2
sanjeev35

40

chaithu

99

100
karthik5625
ramakanth2596
shiva1099

I am applying proc report to above data and computing new variale "total" by adding subject1 and subject2.

i want to print that new variable in descending order....

proc report data=test;

columnname subject1 subject2 total;

define total/computed  ;

compute total;

total=_c2_/_c3_;

endcomp;

run;

help me....

1 REPLY 1
Eva
Quartz | Level 8 Eva
Quartz | Level 8

Dear kuridisanjeev,

I don't think that this is possible within the same proc report. Because proc report works from top the bottom and within that from left to right. You would need a step after that to sort the data.

I suggest you do the sum for "total" in a data step before the proc report and then do the proc report and define the new variable as order / group.

Best wishes,

Eva

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 918 views
  • 3 likes
  • 2 in conversation