BookmarkSubscribeRSS Feed
chrisjab
Fluorite | Level 6

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 

2 REPLIES 2
Reeza
Super User

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

ballardw
Super User

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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1502 views
  • 2 likes
  • 3 in conversation