Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Formula Help

jalizmaldonado
8 - Asteroid

Hi, I'm receiving an "unmatched" error on my formula at the "then" piece:

 

IF (Contains([COMBREG INPUT], "Vacation Accrue") OR (Contains([COMBREG INPUT], "Vac Accrue") && Contains ([G/L CATEGORIES (CR)],"60600 Salaries & Benefits : Vacation expense"))
THEN '22350 Accrued Vacation'
else
[G/L CATEGORIES (CR)]
endif

 

--

I'm assuming I'm missing parentheses around something but every time I add or take away, I keep getting an error. I'm trying to account for:

1. Vacation Accrue

2. Vac Accrue

3. Vac $ Accrue

 

Is there anyone available to look over my formula? 

5 REPLIES 5
CharlieS
17 - Castor
17 - Castor

Looks like you need one more close parenthesis:

IF (Contains([COMBREG INPUT], "Vacation Accrue") OR (Contains([COMBREG INPUT], "Vac Accrue") && Contains ([G/L CATEGORIES (CR)],"60600 Salaries & Benefits : Vacation expense")))
THEN '22350 Accrued Vacation'
else
[G/L CATEGORIES (CR)]
endif

 

In cases of nested logic like this, I like to line out the expression like this to help keep track of the logical steps (and syntax):


IF (
Contains([COMBREG INPUT], "Vacation Accrue")
OR (
Contains([COMBREG INPUT], "Vac Accrue")
&& Contains ([G/L CATEGORIES (CR)],"60600 Salaries & Benefits : Vacation expense")
)
)
THEN '22350 Accrued Vacation'
else
[G/L CATEGORIES (CR)]
endif

Qiu
20 - Arcturus
20 - Arcturus

@jalizmaldonado 
As you assumed, the parenthesis is causing the issue here.

It would be better if they have something highlighted pair of parenthesis as in Excel.

0415-jalizmaldonado.PNG

jalizmaldonado
8 - Asteroid

Thank you so much!

jalizmaldonado
8 - Asteroid

I really appreciate it. Thank you so much. 

Qiu
20 - Arcturus
20 - Arcturus

@jalizmaldonado 
Glad to help and thank you for the accept mark 😁

Labels