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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 986 views
  • 2 likes
  • 3 in conversation