In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Malformed If Statement

ana_nardo_ADP
5 - Atom

Hello, 

 

can someone help me fix my if statement?

 

if [Exposure] >= 1000000 then 'Sr. Management Review'
elseif [Exposure] >= 700000 and [Exposure] <=1000000 then 'Director Review'
elseif [Exposure] >= 400000 and [Exposure] <=70000 then 'Cr. Manager Review'
elseif [Exposure] >= 200000 and [Exposure] <=400000 then 'UW Review'
elseif [Exposure] <= 200000 and [Credit Score] = 1 and [Credit Score]=2 and [Credit Score]=3 then 'Auto-Approved'
ENDIF

4 REPLIES 4
Bren_Spill2
12 - Quasar
12 - Quasar

@ana_nardo_ADP In your last statement I think you need to change the ands between the Credit Score fields to "Or"

 

And wrap that section in parenthesis too

 

 

ana_nardo_ADP
5 - Atom

that makes sense but it didn't fix the malformed error :(

Bren_Spill2
12 - Quasar
12 - Quasar

Sorry - you're also missing the final Else at the very end

 

then 'Auto-Approved' Else ......... Endif

Qiu
21 - Polaris
21 - Polaris

@ana_nardo_ADP 
Including the point from @Bren_Spill2 , I have made 6 markups in your formula for your consideration.

700000, 400000 and 200000 are used for boudary values as >= and <= in two conditions, which may cause ambiguity.

0907-ana_nardo_ADP.png0907-ana_nardo_ADP-A.png

Labels
Top Solution Authors