I'm a new Alteryx user and i'm creating my 1st work flow. I'm using dates and need to buckets those dates into Fiscal Years. I currently do this via excel or in Tableau but would love to add this as a formula in my work flow. I have verified my dates are in the correct format (yyyy-mm-dd) so that isnt an issue. I'm using the below formula and I get get the following error "Parse Error at char(216): Malformed If Statement (expression # 5)". Do i need to convert the dates? They initally come over with time stamps but i use the Configuration tool to remove those. Any help would be greatly appreciated.
IF [LASTDATE] < 2017-06-30 AND [LASTDATE] > 2016-06-30 THEN "FY17"
ELSEIF
IF [LASTDATE] < 2016-06-30 AND [LASTDATE] > 2015-06-30 THEN "FY16"
ELSEIF
IF [LASTDATE] < 2015-06-30 AND [LASTDATE] > 2014-06-30 THEN "FY15"
ENDIF
If there is a better way to do this using another tool i'm open to that as well.