SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
Grimzarn
Calcite | Level 5

Hi, I have the following dataset in Enterprise Guide:

"New_customers_amount" are the amount of new "customer_id" per "Yearmonth_start_date". "Accounting_period" are which months a "Customer_id" has generated revenue

data CLV;
  input Customer_id $ New_customers_amount Yearmonth_start_date $ Accounting_period
;
datalines;
11004345 71  202201 202201
11004345 71  202201 202202
11004345 71  202201 202203
11004345 71  202201 202204
88004686 71  202201 202201
88004686 71  202201 202202
88004686 71  202201 202203
11100257 71  202201 202201
11100257 71  202201 202202
12100557 71  202201 202201
12100557 71  202201 202202
75393716 58  202202 202202
75393716 58  202202 202203
26738388 58  202202 202202
26738388 58  202202 202203
;

 I want to follow which months a new customer generate income for us. Here is the end result i am hoping for:  

image.png

What do i do?

 

1 REPLY 1
PaigeMiller
Diamond | Level 26

I honestly don't understand how the desired output is created from the input, or even what do you mean by Y1. I don't see any connection between the data you show and the output and the concept of "which months does new customers generate income"?

 

I need a lot more explanation and a lot more detailed explanation.

--
Paige Miller

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 1 reply
  • 378 views
  • 0 likes
  • 2 in conversation