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-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
  • 1 reply
  • 741 views
  • 3 likes
  • 2 in conversation