Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Conditional Statements - Meeting some criteria but not all

jalizmaldonado
8 - Asteroid

Hi, I was able to meet the first part of my formula but then the fields labelled as "60600 Salaries & Benefits : Vacation expense" went NULL. Then I tried readding it and everything became "60600 Salaries & Benefits : Vacation expense" 

 

How do I tell Alteryx:

 

IF both conditions are met, then make the change ELSE if only one is met, leave it alone and if none are met leave that alone too?

 

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

ELSEIF

(CONTAINS ([G/L CATEGORIES (CR)], "60600 Salaries & Benefits : Vacation expense"))

THEN '60600 Salaries & Benefits : Vacation expense'

ELSE null()endif

2 REPLIES 2
randreag
11 - Bolide

hello @jalizmaldonado 

 

I check your condition and it is doing what you ask, if I undestood well

 

Just attached a simple example, maybe you have another condition that is invalidating this one?

 

 

jalizmaldonado
8 - Asteroid

Hi @randreag You're formula didn't work for me. However, I was able to figure it out.

 

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

 

It appears that I was being redundant. 

Labels
Top Solution Authors