Announcement | We'll be doing maintenance between 2-3 hours, which may impact your experience. Thanks for your patience as we work on improving the community!

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_Spill
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_Spill
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_Spill , 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