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.
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.
Show some example data to get a code answer 🙂
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 |
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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.