I am trying to determine how old something is, using this formula
if datepart("d",{SITUATIO.Start Date}) >= (datepart("d",CurrentDate))-0
and datepart("d",{SITUATIO.Start Date}) <= (datepart("d",CurrentDate))-89
then "<3 months" else
if datepart("d",{SITUATIO.Start Date}) >= (datepart("d",CurrentDate))-90
and datepart("d",{SITUATIO.Start Date}) <= (datepart("d",CurrentDate))-179
then "3 - 6 months" else
if datepart("d",{SITUATIO.Start Date}) >= (datepart("d",CurrentDate))-180
and datepart("d",{SITUATIO.Start Date}) <= (datepart("d",CurrentDate))-364
then "6 - 12 months" else
if datepart("d",{SITUATIO.Start Date}) >= (datepart("d",CurrentDate))-365
then "> 1 Year"
Only problem is, despite having dates that are only a few weeks/months old, it only seems to return the last value.
Anyone help with this please, it really is annoying me.