Hi, I am trying to create a new field named [Values] using the formula tool from [Date] and [Max_Date] field.
I would like one case statement that will result in values 1, 2,3,4,5
IF [Date]>= DateTimeAdd([Max_Date],-14,'days')) and [Date]<= [Max_Date] then 1
ELSEIF [Date]>= DateTimeAdd([Max_Date],-30,'days') and [Date]<= [Max_Date] then 2
ELSEIF [Date]>= DateTimeAdd([Max_Date],-90,'days') and [Date]<= [Max_Date] then 3
ELSEIF [Date]>= DateTimeAdd([Max_Date],-120,'days') and [Date]<= [Max_Date] then 4
ELSE 5
ENDIF
Unfortunately there is an overlap between 1,2,3,4,5 and I am not sure how to do this. Any help is appreciated