Hi, can anybody tell me why this formula does not work? when I put 'ENDIF" it deactivates the end of the formula
What does the Error message state when you try to run the workflow?
Alteryx may not be processing "06" (June") as a date part.
Why not create a properly formatted DATE field (i.e., 2018-07-1, 2019-06-30, etc.) and use it in your IF statement.that creates a new FY field. This would avoid dealing with date parts.
if [DATE] >="'2018-01-07) and [DATE] <="2019-06-30" then ..."FY19" or however you need it exactly.
@JustynaMZ @Check the data type of the fields [Hire Month] and [Hire Year] to see they are string type or not? If they are numeric the. You need to remove the “ from the year and month
is it [Hire Year] or [hire year] - you have both. Alteryx is (or at least recent versions are) case sensitive and specific with field names.
Hi @JustynaMZ
Aside from checking the field types as mentioned above, you can also replace your formula with this one
if [hire month]<="06" then
"FY"+Right(ToString([hire year]),2)
else
"FY"+Right(ToString([hire year]+1),2)
endif
Using this method, you won't have to change your workflow to make it work after July 2023. This method will also remove the possibility of typos, like your last clause where you have year=2023 and month<=6 but year =FY24
Dan