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

Having trouble transferring this if and statement into alteryx

kdelisi002
7 - Meteor

=IF(AND(ABS(AD6)>0,Y6=0,AZ6<>"EXP_TX",AZ6<>"SELUNWD_TX"),"FAIL","PASS")

 

Is putting this in Alteryx possible? I'm running into problems and not sure where to start.

6 REPLIES 6
CharlieS
17 - Castor
17 - Castor

The Alteryx syntax with Excel arguments is:

IF <logical_test> THEN <value_if_true>

ELSE <value_if_false> ENDIF

 

and since you want both conditions, use "(<logical_test1> and <logical_test2>)"

 

Without testing it, it should be:

 

IF (ABS(AD6)>0,Y6=0,AZ6<>"EXP_TX" AND AZ6<>"SELUNWD_TX") THEN "FAIL"
ELSE "PASS" ENDIF

 

 

Let me know if that works.

kdelisi002
7 - Meteor

I tried that and it still says Malformed if Statement. It looks like it's not registering anything after the first condition. See screenshot below. ThanksCapture.JPG

MarqueeCrew
20 - Arcturus
20 - Arcturus

Assuming that [BaseRealizedGL] is a Numeric data type..... 

 

is there ever a time that the absolute value of a number is less than 0?

 

IF ABS([BaseRealizedGL]) > 0 && [BaseProceeds] = 0
   && [close tx type] NOT IN("EXP_TX","SELUNWD_TX")
THEN "FAIL"
ELSE "PASS"
ENDIF

Cheers,

Mark

 

 

 

 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
CharlieS
17 - Castor
17 - Castor

Oops, I missed another <logical_test> that needed an "AND"/"&&". Good thing @MarqueeCrew was here to save the day.

kdelisi002
7 - Meteor

Haha good point. Appreciate the help

MarqueeCrew
20 - Arcturus
20 - Arcturus

@CharlieS,

 

I can't keep up with you.  Fortunately, you left me a little opening to help someone. Thanks for all of the effort in helping the community.  I see your effort and give you public kudos for it.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels
Top Solution Authors