Start Free Trial

Alteryx Designer Desktop Discussions

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

Malformed IF Statement

CRogers22
8 - Asteroid

Capture.PNG

 

I'm trying to run through the 5 different test and getting Malformed. Can anyone help me understand why? Thank you in advance.

 

 

IF IsNull([NOI_Sent_Date]) then 'Null'
ELSEIF ToNumber([Attribute 3 Days])<=30 Then 'Pass'
OR IF ToNumber([Attribute 4 Days])<=30 Then 'Pass'
ELSEIF ToNumber([Attribute 3 Days])>30 Then 'Fail'
OR IF ToNumber([Attribute 4 Days])>30 Then 'Fail' Else 'N/A' EndIf

7 REPLIES 7
binu_acs
21 - Polaris

@CRogers22 try

IF IsNull([NOI_Sent_Date]) THEN 
    'Null'
ELSEIF ToNumber([Attribute 3 Days]) <= 30 OR ToNumber([Attribute 4 Days]) <= 30 THEN 
    'Pass'
ELSEIF ToNumber([Attribute 3 Days]) > 30 OR ToNumber([Attribute 4 Days]) > 30 THEN 
    'Fail'
ELSE 
    'N/A'
ENDIF
CRogers22
8 - Asteroid

The Formula was not Malformed but I'm getting false Fails.

 

Capture 2.PNG

 

If it fails the first Attribute but passes the other Attribute I need it to be a pass. Does that makes sense? not sure what I'm doing wrong as far as that goes.

CRogers22
8 - Asteroid

@binu_acs sorry I used next tab in that second picture but same principal as its the same formula with different "Days"

Carolyn
12 - Quasar
12 - Quasar

Are you able to provide some sample data and a sample workflow? It'll make it easier for people to troubleshoot.

 

 

ELSEIF ToNumber([Attribute 6 Days]) <= 30 OR ToNumber([Attribute 7 Days]) <= 30 THEN 
    'Pass'

 

 

Assuming this is the formula in the "Attribute 6" column, then I would expect it to say "Pass", so some sample data would be helpful

CRogers22
8 - Asteroid

Yes it's currently:

 

IF ToNumber([Attribute 6 Days])<=30
OR
ToNumber([Attribute 6 Days])<=30 Then 'Pass'
Elseif ToNumber([Attribute 6 Days])>30
OR ToNumber([Attribute 7 Days])>30 Then 'Fail'
Elseif [Withdrawn_Date]="NULL"
Then 'Missing Date' Else 'N/A' ENDIF

 

I'm not able to share sample data If that means you can't help I understand. Thanks for the help provided so far.

 

Carolyn
12 - Quasar
12 - Quasar

I think line 3 is what's wrong. Should it be Attribute 7, not Attribute 6?

 

IF ToNumber([Attribute 6 Days])<=30
OR
ToNumber([Attribute 6 Days])<=30 Then 'Pass'

CRogers22
8 - Asteroid

I'm losing it today. thank you so much I think this is the Fix.

Labels
Top Solution Authors