Hi, all. I am pretty new to SAS and am looking for some assistance with some research I am trying to do on a system that blocks risky transactions. I have a data set that looks like this Account Name Date Time Amount Risky Blocked --------------------- ------ -------- ---------- ------- ----------- Bill 1/1/2011 02:30 1.00 1 0 Bill 1/1/2011 02:33 100.00 1 1 Bill 1/2/2011 02:15 300.00 1 0 Bill 1/3/2011 02:20 200.00 1 1 Bill 1/3/2011 03:30 100.00 1 1 Bill 1/3/2011 09:45 150.00 0 0 Bill 1/3/2011 10:00 200.00 1 1 Jane 1/1/2011 01:00 50.00 1 1 Jane 1/1/2011 01:30 50.00 1 1 What I want from the data is this: I am looking for the following totals for the number of risky transactions that were or were not blocked within 24 hours of the the first blocked risky transaction: Sum(Amount of Risky that are not blocked after the first trxn): Count(Num transactions not risky) Count(num transactions risky) Count(Number of customers that have had risky transactions not blocked after the first block). So, for Bill, the 2nd Transaction marks the start of the first 24 hour clock. Then I want to start a second 24 hour clock for the the transaction in Row 5. The totals should look like this Sum(Amount of Risky that are not blocked within the 24 hr window): 500.00 (Row 3 + Row 7) Count(num transactions risky not blocked after the first trxn): 2 (count of Row 3 and Row 7 Count(Number of customers that have had risky transactions not blocked after the first block): 1 (Bill Only) There are of thousands of accounts in this data set, so it is not feasible to do by hand. Thanks for the help!!
... View more