BookmarkSubscribeRSS Feed
hdg
Obsidian | Level 7 hdg
Obsidian | Level 7

Hello everyone,

I have the following dataset

    dateNAME OF FORMERabc
3/31/2014weight0.325350.129620.1317
3/31/2014active-0.284150.021460.01334
4/30/2014weight0.32690.132790.13384
4/30/2014active-0.281470.023710.01418

I would like to sort the rows based on max date in the above table and the  name = active. In this case all rows will be sorted based on row 4:

for example the resulting data set looks like below.

This is just a small example of 3 columns but I could have more.

    dateNAME OF FORMERacb
3/31/2014weight0.325350.13170.12962
3/31/2014active-0.284150.013340.02146
4/30/2014weight0.32690.133840.13279
4/30/2014active-0.281470.014180.02371

Any help is appreciated many Thanks!

1 REPLY 1
ballardw
Super User

Doesn't look like a sort at this point just a column reorder. There are several threads in the forum about reordering data columns in a data set.


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
  • 619 views
  • 0 likes
  • 2 in conversation