from below set how to find the month and year if maximum attration at member level...(d_date2 is attration )
Obs ID Phone LastHired BirthDate Height Month Day termination salary termin d_date2
1 327M 5553489 08APR2000 25APR1978 69 4 8 10JAN2014 15000 t 13
2 102M 5556012 20AUG1999 16MAR1955 70 8 20 . 26000 a 17
3 131F 5556781 16MAY1997 10SEP1976 64 6 25 25DEC2016 35000 t 19
4 709F 5554023 25JUN1994 08JAN1962 69 9 17 . 28000 a 22
5 056F 5559909 17SEP1991 31JAN1930 59 12 10 . 33000 a 25
6 287M 5557024 10DEC1993 14JUL1969 78 11 23 . 40000 a 23
7 097F 5557045 23NOV1994 17AUG1972 68 11 12 15MAY2000 21000 t 5
8 070M 5555602 12NOV1995 14FEB1946 71 3 27 20FEB2005 23000 t 9
9 217M 5558114 27MAR2000 19MAY1963 71 7 18 . 58000 a 16
10 118F 5559100 11OCT1998 06OCT1977 66 12 2 . 47000 a 18
11 187M 5553688 18JUL1996 22MAR1925 76 1 7 . 63000 a 20
12 035M 5555131 02DEC1998 23JUN1974 70 12 6 06JUN2008 45000 t 9
13 254F 5554950 07JAN2000 27FEB1940 63 8 25 28AUG2009 50000 t 9
14 167F 5558333 06DEC1999 27OCT1969 69 5 22 11NOV2016 39000 t 16
15 093F 5552525 25AUG1993 05NOV1963 57 2 25 . 42000 a 23
16 261M 5557831 22MAY1994 01NOV1965 70 11 15 . 24000 a 22
17 088M 5551006 25FEB2000 28MAY1950 69 9 17 15FEB2017 19000 t 16
18 134M 5559945 15NOV1998 16AUG1959 73 11 1 . 46000 a 18
19 207M 5556563 17SEP1996 15APR1947 67 11 25 . 48000 a 20
20 158F 5555613 01NOV1995 10JAN1971 65 10 28 . 47000 a 21
21 065M 5552709 04DEC1994 23JUL1964 60 9 30 . 80000 a 22
22 288M 5551856 25NOV1997 01JUL1965 73 2 22 . 75000 a 19
23 134F 5554442 28OCT1999 18SEP1979 69 5 5 . 44000 a 17
24 025F 5552442 30SEP1998 07MAY1971 65 10 15 . 36000 a 18
@Ravikumarpa4 wrote:
from below set how to find the month and year if maximum attration at member level...(d_date2 is attration )
You apparently want a month and year for the record in which d_date2 is at its maximum. But you didn't identify the variables needs to get that month and year. Please provide a complete description of your task. Also, what do you want to do when there are multiple records with maximum d_date2?
Your sample data only has one record per ID, so there is nothing to do to find the record for each ID that has the maximum value of D_DATE2.
Did you mean something else?
Perhaps you can post other sample data.
It would help to post what you want the output to look like.
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!
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.