title: SAS - Using the retain statement
body: <p>I have a dataset with ids, dates and amounts. Each id may have a few rows depending on the transaction amounts and the number of transactions performed. I need to use a retain statement to find the difference in time between the first change in amount. I know I need to retain all 3 variables but am unsure how to go about this? Any help would be great</p>