The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
GELÖST

IF AND Statement Question

Shan_Drex12
Meteoroid

Hi All, 

 

I'm having trouble with this IF AND statement that I have on excel. Check below:

 

=IF(AND(AG5="",J5="FLOAD",F5="OCPD"),M5)

 

Check out Date (AG5) = "blank cell"

 

Stock Status (J5) = "FLOAD"

 

Regular Status (F5) = "OCPD" 

 

SPEND (M5) = "140"

 

I tried using this formula below but I keep getting FALSE in the Alteryx column:

 

IF [Trailer Check Out]="" AND [Trailer Stock Status]="FLOAD" AND [Trailer Status]="OCPD" THEN [Detention Spend] ELSE "FALSE"
ENDIF

 

Your help would be greatly appreciated!! 🙂 

3 ANTWORTEN 3
tanvir_khan
Asteroid

Hi .@Shan_Drex12 

Looking at your if statement, I think the blank cell condition is not working properly. Can you please eliminate that [Trailer Check Out]=""] and test your workflow.

 

This is a sample if condition I've used in Formula tool and it's working fine.

IF (([BILL] = "HWBB" OR [BILL] = "Inter")
AND [TOTAL] > 550) OR (([BILL] = "HWBB1" OR
[BILL] = "Inter1") AND [TOTAL] > 250)
THEN "T" ELSE "F"
ENDIF

 

Thanks!

Hi @Shan_Drex12 , in order to represent a blank or null cell in alteryx you might have to use isnull(Field) or isempty(Field) function.

Something like this:

IF isnull([Trailer Check Out]) or isempty([Trailer Check Out]) AND [Trailer Stock Status]="FLOAD" AND [Trailer Status]="OCPD" THEN [Detention Spend] ELSE "FALSE"
ENDIF

 

It would be better to have a sample workflow so that we can figure out the issue if not the one mentioned above.

 

Thanks.

Sapna Gupta
RolandSchubert
16 - Nebula
16 - Nebula

Hi @Shan_Drex12 ,

 

you could use IsEmpty to check the condition for [Trailer Check Out], the function checks for NULL or blank values. If there may be a " " (space) in the cell, use an additional TRIM to remove this whitespace.

Formula would like like this: 

IF IsEmpty(Trim([Trailer Check Out])) AND [Trailer Stock Status]="FLOAD" AND [Trailer Status] ="OCPD" THEN
[Detention Spend]
ELSE
"FALSE"
ENDIF

 

Hope tihsi is helful.

 

Best,

 

Roland

Beschriftungen
Top-Lösungs-Autoren