This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
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"
If there is a better way to do this using another tool i'm open to that as well.
Thanks for the quick response. It actually took a combination of both of your posts.
IF [LASTDATE] <= '2017-06-30' AND [LASTDATE] > '2016-06-30' THEN "FY17" ELSEIF [LASTDATE] <= '2016-06-30' AND [LASTDATE] > '2015-06-30' THEN "FY16" ELSEIF [LASTDATE] <= '2015-06-30' AND [LASTDATE] > '2014-06-30' THEN "FY15" ELSE "ERROR" ENDIF
And I had to convert the output field from numeric to V String.