BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I don't know how to compare two rows for a same variable. For instance, if I have

obs1 56
obs2 57

I wanna check if 57-56 = 1.

Thanks.
2 REPLIES 2
Flip
Fluorite | Level 6
Try
if x-lag(x) = 1
deleted_user
Not applicable
thank you, it works 🙂
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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