BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Azhar_ca
Calcite | Level 5

Hi Folks

 

looking for some smart tip .

 

i have a dataset for customers which has a numeric variable containing customer accounts deactivation dates (2 years data).

 

how can i sum total number of deactivation in each month for two years.

your kind response will be appreciated.

 

thanks kindly.

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

I think you are looking for this:

 

proc freq data=have;

tables deactdt;

format deactdt monyy7.;

run;

 

If that's not it, you might need to add some detail about the outcome you are seeking.

View solution in original post

4 REPLIES 4
PeterClemmensen
Tourmaline | Level 20

Show some example data to get a code answer 🙂

Azhar_ca
Calcite | Level 5

hi

 

 

i attached my dataset as i printed only 20 observation out of thousand.

 

appreciate

 

Obs

Acctno

actdt

deactdt

deactreason

goodcredit

rateplan

dealertype

AGE

Province

sales

1

1176913194483

06/20/1999

01/20/2001

 

0

1

A1

58

BC

$128.00

2

1176914599423

10/04/1999

10/15/1999

NEED

1

1

A1

45

AB

$72.00

3

1176951913656

07/01/2000

01/20/2001

 

0

1

A1

57

BC

$593.00

4

1176954000288

05/30/2000

01/20/2001

 

1

2

A1

47

ON

$83.00

5

1176969186303

12/13/2000

01/20/2001

 

1

1

C1

82

BC

.

6

1176991056273

08/31/1999

09/18/2000

MOVE

1

1

C1

92

QC

$1041.00

7

1176991866552

05/24/2000

01/20/2001

 

1

1

A1

77

ON

.

8

1176992889500

11/28/2000

01/20/2001

 

1

1

C1

68

AB

$72.00

9

1177000067271

12/23/1999

01/20/2001

 

0

1

B1

75

ON

$134.00

10

1177010940613

12/09/1999

01/20/2001

 

1

2

A1

42

NS

$11.00

11

1177025997013

11/09/1999

01/20/2001

 

1

1

A1

26

BC

$154.00

12

1177027515760

10/19/1999

01/20/2001

 

1

1

B1

73

BC

$16.00

13

1177028996676

09/21/2000

01/20/2001

 

0

1

C1

.

QC

$179.00

14

1177038747105

03/14/2000

01/20/2001

 

0

1

C1

41

ON

$705.00

15

1177045857516

06/22/2000

01/20/2001

 

1

1

A1

53

QC

$83.00

16

1177057406016

09/21/2000

01/20/2001

 

0

1

C1

50

ON

$529.00

17

1177066422248

04/26/1999

01/15/2001

NEED

0

1

A2

55

NS

$44.00

18

1177089399155

08/17/2000

01/20/2001

 

1

3

A1

56

BC

$548.00

19

1177113886410

09/13/2000

01/08/2001

COMP

0

1

C1

45

ON

$63.00

20

1177128264924

12/10/1999

01/20/2001

 

1

1

B1

38

ON

$178.00

 

Astounding
PROC Star

I think you are looking for this:

 

proc freq data=have;

tables deactdt;

format deactdt monyy7.;

run;

 

If that's not it, you might need to add some detail about the outcome you are seeking.

Azhar_ca
Calcite | Level 5
Thats astounding solution, simple and smart
Thanks again for sharing the code.

Thanks

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1797 views
  • 2 likes
  • 3 in conversation