DuncinJones
MIS
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.
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.