I am trying to write an expression to look at two columns in my file. The first column can meet two criteria (Daily or Weekly) then second column can only say Sunday. I have tried many variations and most often the error says it can't end with an operator.
I googled and found II looking thing that I think can be used for the OR but it still isn't right.
Here is my latest try:
IFContains([Product Type],"DAILY")||contains([Product Type],"Weekly") && ([Insert Day],"Sunday")
THEN "X" Else "" ENDIF
Any help would be great!!
Thanks!
Solved! Go to Solution.
Try:
IF (Contains([Product Type],"DAILY") || Contains([Product Type],"Weekly")) && ([Insert Day] = "Sunday") THEN "X" ELSE "" ENDIF
I am not sure of the precedence order of || vs && in Alteryx but expect it follows the C++ order so && is processed before ||. To get round this you need to bracket the || conditions.
(I am not in front of Alteryx so possible mistake in formula!)
Worked perfectly!! Thanks so much!
I guess one of the things I didn't get is the Day = Sunday. I didn't do the equals! How do you know to do that since the other two only used a comma?
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |