Desktop productivity for business analysts and programmers

Last Three Months Activity Count

Reply
Contributor
Posts: 21

Last Three Months Activity Count

Good Morning,

 

I am currently trying to get the last three months Activity count (at the unique transaction date level - ie. if I had 3 transactions on 2016/07/07 that's 1 day of transactions) for a group of customers; and the information I have are:

 

Member No, Membership Enrollment Date, Transaction Dt and Type of Transaction

 

I was able to filter for the last 3 months activities using  the follwing caltulation  transactiondate >= TODAY()-90

 

However I am not sure how to get a count of the transactions in the last three months.

 

My ultimate goal is to quantify the last three month activities of members based on their month of membership enrollment.

 

Attached is a sample file.

 

Thanks,

 

CJ 

Grand Advisor
Posts: 17,464

Re: Last Three Months Activity Count

If you're using EG look at the Summary Task to summarize your data. 

Grand Advisor
Posts: 10,251

Re: Last Three Months Activity Count

[ Edited ]

Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existant constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.

This link

https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...

shows how to turn a SAS dataset into data step code to recreate your data. Post that or a text (.txt extension) file with the results. If the data file is large you can use the OBS option, either system or data set, to restrict the number of rows resulting.

 

With that you have a better chance of getting tested code or more complete ideas.

Ask a Question
Discussion stats
  • 2 replies
  • 272 views
  • 2 likes
  • 3 in conversation