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

IF And Statements

JamesBond
6 - Meteoroid

Hello - 

 

I'm trying to write the following excel formula in Alteryx; wondering if anyone can help:

 

if(A2 = "ACQ", "",if(A2="P&G", "", if(A2 = "R&D", if(C2 <1,0,if(c2 >=1 and C2 <100),"Level1",if(c2>=101 and C2<200), "Level2",if(C2>=200, "Level3")))

 

7 REPLIES 7
danilang
19 - Altair
19 - Altair

Hi @JamesBond 

 

Normally this process is very simple, just replacing each "if" with "iif".  However, the formula that you've posted isn't valid in Excel either.  As an example, your last if is missing the false statement.  Did you make a transcription error?

 

Dan

Qiu
21 - Polaris
21 - Polaris

@JamesBond 
Hope I get your correct.

Capture4.PNG

JamesBond
6 - Meteoroid

 

Yes, transposition error on my end.

 Trying to copy from one PC to another PC.

 

Let me try again: 

 

=if(K2="R&D","",if(k2="P&G","",if(and(k2="ACQ",L2<1000),0,if(and(L2>=1000,L2<2200),"Level1,if(and(L2>=2200,L2<4000),"level2",if(L2>4000, "Level3")))

 

That's what I'm trying to make work. Thanks - Ryan

JamesBond
6 - Meteoroid

Thank you very much.

 

Ryan

JamesBond
6 - Meteoroid

n

danilang
19 - Altair
19 - Altair

Hi @JamesBond 

 

Can you provide some sample data and what your expected outcome is?  It would limit the amount of back and forth required to come up with a final solution.  

 

Thanks

 

Dan

JamesBond
6 - Meteoroid

Dan - I was able to get it working based upon what Qui posted earlier. 

 

Appreciate the patience and help. 

Ryan

 

 

 

 

Labels
Top Solution Authors