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

Formula IF condition

Ana_Miranda_2022
5 - Atom

I'm trying to replicate this formula from excel in alteryx, but I'm not getting it. Could anyone help me?

 

Formula: =IF(AND(D5<>"",G5<>""),"review","")

 

Below the data screen: I want to check if what is in the "365 days" (D5 in excel) column and what is in the "Current" (G5 in excel) column has value, if so, bring the word "review", otherwise bring nothing.

 

Thank you!

 

Ana_Miranda_2022_0-1652366506772.png

 

7 REPLIES 7
DataNath
17 - Castor
17 - Castor

What is the error that you are currently getting? And could you also clarify a bit - are you looking to see if the two fields are not null, are they bigger than 0? Or just looking to see if there's a value in them rather than null? Thanks!

binuacs
21 - Polaris

@Ana_Miranda_2022 

 

IF(!isEmpty(D5) AND !isEmpty(G5),”review”,’’)

Ana_Miranda_2022
5 - Atom

The second condition:  just looking to see if there's a value in them rather than null, if it is, should show word 'review'.

DataNath
17 - Castor
17 - Castor

Ok @Ana_Miranda_2022 that’s fairly straight forward then! Should just be able to use the following for your flag field:

 

if !isnull([365 Days]) and !isnull([Current]) then ‘Review’ else ‘<insert what you want to input if not review>’ endif

DataNath
17 - Castor
17 - Castor

Not sure if I’ve misread - if you want to put ‘review’ into your flag field when they ARE null then just remove the exclamation marks and use ‘OR’ instead of ‘AND’.

grazitti_sapna
17 - Castor

Hi @Ana_Miranda_2022 ,

 

Try this

In case the field is null --- if (!IsNull([365 Days]) and !IsNull([Current]))  then "Review" else "" endif

 

grazitti_sapna_1-1652377806534.png

 

In case the field is empty or blank --- if (!IsEmpty([365 Days]) and !IsEmpty([Current])) then "Review" else "" endif

 

grazitti_sapna_0-1652377780385.png

 

Thanks!

Sapna Gupta
Ana_Miranda_2022
5 - Atom

Thanks. This formula worked for me!

Labels
Top Solution Authors