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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 809 views
  • 3 likes
  • 2 in conversation