Using combination of IF and CASE

So I'm trying to create a calculated column with the following formula:

If((DateTimeNow()>=Date(DatePart('yy',DateTimeNow()),4,1)) and (DateTimeNow()<=Date(DatePart('yy',DateTimeNow()),10,31)),
        case  
        when ([date_column]>=Date(DatePart('yy',DateTimeNow()),4,1)) and (DateTimeNow()>=Date(DatePart('yy',DateTimeNow()),10,31)) then "Current" 
        when ([date_column]>=Date(DatePart('yy',DateTimeNow()),11,1)) and (DateTimeNow()>=Date(DatePart('yy',DateTimeNow()) + 1,3,31)) then "Future"
        END,
        case  
        when ([date_column]>=Date(DatePart('yy',DateTimeNow()),4,1)) and (DateTimeNow()>=Date(DatePart('yy',DateTimeNow()),10,31)) then "Previous" 
        when ([date_column]>=Date(DatePart('yy',DateTimeNow()),11,1)) and (DateTimeNow()>=Date(DatePart('yy',DateTimeNow()) + 1,3,31)) then "Current"
        END)

Essentially, first it would check if the current date is between 4/1 of the current year and 10/31 of the current year.  After that has been determined, check the date column and if it falls between the dates i have noted, it would return either Current or Future otherwise it would return Previous or Current.

Problem is that the way my formula is currently written, it's not returning anything.  Anyone have any thought on why?

(1) Answer

Login