Hi Guys,
I'm new to Alteryx.
I'm facing issues using If condition in my workflow. I guess the issue is with the String used.
My output what I need is if the if the days are more that 365 I want it to say "LT" if not then "ST"
Can someone help me with the issue. I have attached my sample workflow here.
Thanks for helping in advance.
Solved! Go to Solution.
Hello @RAJAYKUMAR001 ,
When you put a number within quotes "365" means that you are using a string and not a number. If you want it to work first you have to change te value to number:
IF ToNumber([# Days])>365 THEN "LT" ELSE "ST" ENDIF
This way it should work
Cheers
The Select in your workflow converts [# Days] to a string. Why do this if you want to do numerical comparisons further on? I don't have your input xlsx file, but I would guess that [# Days] is being read as a number. If you leave [# Days] as a number, you don't need ToNumber() when using it formulas.
Dan