Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Predicting Retirement Year

Status
Not open for further replies.
Aug 10, 2010
2
US
Been scanning and searching by Keyword with a few results found, however nothing that currently fixes my issue.

I've been using this formula in Crystal 9 to predict someone's retirement year. Then using that information to create a pie-chart that breaks down the population into 'Less than 1 year' to 'More then 15 Years'.

I've gotten the dates to work, however the code is only look at one variable. I, however, need it to look at two groups:
55 years of Age and 10 years of Tenure
OR
65 years of Age and 5 Years of Tenure

Could you guys help me out?

Here's my formulas:

Age55: date(dateadd("yyyy",55,{BAC_DC_EEO_BREAK_OUT.BIRTHDATE}))

Age65: date(dateadd("yyyy",65,{BAC_DC_EEO_BREAK_OUT.BIRTHDATE}))

Year5Date: date(dateadd("yyyy",5,{BAC_DC_EEO_BREAK_OUT.REHIRE_DT}))

Year10Date: date(dateadd("yyyy",10,{BAC_DC_EEO_BREAK_OUT.REHIRE_DT}))

Eligibility2:
If {@Year10Date} <
(if CurrentDate < {@Age55} then {@Age65} else
if CurrentDate >= {@Age55} then {@Year5Date}) then {@Year10Date} else

If {@Year10Date} >=
(if CurrentDate < {@Age55} then {@Age65} else
if CurrentDate >= {@Age55} then {@Year5Date}) then
(if CurrentDate < {@Age55} then {@Age65} else
if CurrentDate >= {@Age55} then {@Year5Date})

Eligibility:
If {@Age55} <
(if {@Eligibility2} < {@Age55} then {@Age55} else
if {@Eligibility2} >= {@Age55} then {@Age65}) then {@Age65} else

if {@Age55} >=
(if {@Eligibility2} < {@Age55} then {@Age55} else
if {@Eligibility2} >= {@Age55} then {@Age65})
Then
(if {@Eligibility2} < {@Age55} then {@Age65} else
if {@Eligibility2} >= {@Age55} then {@Eligibility2})

And then I have a count to break things out:
if {@Eligibility} <= Date(2010,12,31) then "1 Year Or Less" else
if {@Eligibility} <= Date(2015,12,31) and {@Eligibility} > Date(2011,1,1) then "5 Years Or Less" else
if {@Eligibility} <= Date(2020,12,31) and {@Eligibility} > Date(2016,1,1) then "6 To 10 Years" else
if {@Eligibility} <= Date(2025,12,31) and {@Eligibility} > Date(2021,1,1) then "11 To 15 Years" else
if {@Eligibility} > Date (2025) then "More Then 15" else "N/A"

Let me know what you think or could offer for help. And thank you in advance! Or Sorry for noting being smart enough to use a search function.
 
Can you explain how tenure is supposed to be considered in relation to age instead of us having to deconstruct your formulas?

-LB
 
Not a problem...

Basically you fall into two groups for retirement:

Your age is 55 years, but less then 65 years and you have at-least 10 years of tenure.


Then the other group is anyone over the age of 65 and has 5 years of tenure.

So I'm attempting to build something that will predict the date you'd match the criteria.
 
if currentdate >= {@Age55} and
currentdate < {@Age65} and
currentdate >= {@Year10date} then
"Age 55 and 10 Years of Tenure" else
if currentdate >= {@Age65} and
currentdate >= {@Year5Date} then
"Age 65 and 5 Years of Tenure"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top