BookmarkSubscribeRSS Feed
sandy95
Calcite | Level 5

Hi,

 

I need help on finding out if a customer made a transaction over 40000 and that customer is eligible for perks (FT) for 14days and for same customer after 14 days they will not get perks and i want to know if they did any transaction over 5000.

 

Please let me know how to calculate and see historical transaction data of a customer when he was enjoying perks for over 40000 and after losing perks transaction of amount 5000.

 

Thanks

3 REPLIES 3
Astounding
PROC Star

It sounds possible.

 

But first, you would need a SAS data set holding the information.

 

Then you would need to know the names of the variables.

 

Then you would need to know whether the transaction date information is a SAS date, a SAS datetime, or a character string.

 

And then you would need to post all that information.

sandy95
Calcite | Level 5

I have columns with Created_TS, FT_FLAG (1,0) AMT TRAN_KEY FT_DT CUSTOMER_NAME

 

Created_TS               FT_FLAG  AMT TRAN_KEY FT_DT            CUSTOMER_NAME

1JAN1960:00:00:00    1               40000 1234           10JAN2019     Oracle

1JAN1960:00:00:00    1               40000 12345           10JAN2019     Oracle

1JAN1960:00:00:00    0               500000 123456       10JAN2019     Java

1JAN1960:00:00:00    0              40000 12334567           10JAN2019     Java

1JAN1960:00:00:00    1               20000 123455678           10JAN2019     SUN

1JAN1960:00:00:00    0               30000 123456789           10JAN2019     JAVA

 

 

The above data set is an example of mine, i need to create a flag stating if FT=1 and Amount = 40000 then Y, FT = 0 and Amount = 500000 then N end as Sent_flag

for Same Customer with transactions

 

 

Astounding
PROC Star

You're getting closer.  Now change the sample data so that it refers to just one customer.  Include some variation in the dates, so we can see the "14-day rule" in action.  And show the new column that you would like calculated.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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