Hi experts,
I have a banking transaction table and I want to track that for today() - x days time period if Y times same amount transactions occured.
Fore example for the last 5 days a customer receives swift 10 times.And 3 of them are the same amount. How can write this sas code?
Many thanks,
Best Regards
Please post sample data and expected output.
Without variable names or example data it is bit difficult to write code. Here is some pseudocode that would create data set with counts.
proc freq data=have; where (today() - transactiondate) le 5; tables customer*transactiontype*amount/list out=transactioncount; run;
This assumes that you have a variable for the transaction date that is a SAS date valued variable (NOT date time, if your variable includes time then use DATEPART(transactiondate) above), a customer id variable, a single variable that indicates transaction type and the amount.
After you have the summary then you can filter or summarize.
If your data does not meet the above assumptions then it becomes critical to know exactly how your data is structured, i.e. Example data.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.