Hi,
I am trying to create new column based on my below condition. however, this is not working in formula tool. Can someone please help me correcting the IF statement.
IF Contains([Period], "One YearEnded") then "Cumulative" ELSEIF Contains([Period], "_2" and "One YearEnded") then "Annulized"
ELSE "Annulized" ENDIF
(Screenshot attached)
Solved! Go to Solution.
Very helpful and needed context - based on your table's values, try this: IF Contains([Period],"One YearEnded") THEN "Cumulative" ELSE "Annulized" ENDIF
HOWEVER your description of "One "YearEndedMM/DD/YY_2" doesn't match the value in the table - if this is the case, it needs to be adapted: IF Contains([Period],"One YearEnded") AND !Contains([Period],"_2") THEN "Cumulative" ELSE "Annulized" ENDIF
@anonymous008_G can you please help clarify what your desired outcome is for Two YearsEnded12/31/23?
Is it Annualized YearEnded12/31/23_2
and for Four YearsEnded12/31/23 would it be Annualized YearEnded12/31/23_2
My approach:
This:
IF Contains([Period], "One YearEnded") AND !Contains([Period], "_") THEN "Cumulative" ELSE "Annualized" ENDIF
or this:
IF Contains([Period], "Years") OR Contains([Period], "_") THEN "Annualized" ELSE "Cumulative" ENDIF
I want end result as if column contains One YearEnded then Cumulative , if column contain One YearEnded and _2 then Annualized else everything should be annualized. In the raw data One YearEnded12/31/23 this value is double differentiating one value for cumulative and other value which converted as _2 by alteryx is annualized. I don't want any dependencies on date since this is going to change every year.
@anonymous008_G my most recent answer meets these requirements!
@anonymous008_G I would appreciate one of my posts also being marked as a solution since the same function (bar "_2" instead of "_") was mentioned prior (and you can accept multiple posts as solutions). Thank you in advance!
thank you all. this is works now