Sas

Asked • 03/26/19

reading next observation's value in current observation?

I've a dataset called 'input' with the following observations ID Salary 10 1000 20 2000 30 3000 40 4000 I need an output dataset with following observations ID Salary Next_row_Salary 10 1000 2000 20 2000 3000 30 3000 4000 40 4000 null Note: The scenario is next obersavtion's salary should be the current observation's value for the column Next_Row_salary. If there is no next observation then the current observation's value for the column Next_Row_salary should be 'null'. Kindly help me out in creating a sas code for this scenario.

1 Expert Answer

By:

Rick A. answered • 03/26/19

Tutor
5 (33)

Experienced SAS Professional

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.