Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Multiple If Statment help

wonka1234
10 - Fireball

Say I have this dataset - 

 

TypeTest Conclusion One Conclusion Two Conclusion
DetailedIneffectiveIneffectiveIneffective
OverallIneffectiveIneffectiveIneffective
DetailedEffectiveEffectiveEffective
OverallEffectiveEffectiveEffective

 

If Type is detailed then compare test and one, if type is overall then compare test conclusion to two conclusion

 

This is what I have -

If( [Type] = "Detailed" then [Test Conclusion] = [ One Conclusion] then "Match"
elseif [Type] = "Overall", [Test Conclusion] = [ Two Conclusion] then "Match"
else "Unmatched"
Endif

 

Thanls.

3 REPLIES 3
alexnajm
18 - Pollux
18 - Pollux

I think this fixes it! It at least runs, just not sure if it accomplishes your goal - if you need help, please provide your expected output.

 

If [Type] = "Detailed" AND [Test Conclusion] = [ One Conclusion] then "Match"
elseif [Type] = "Overall" AND [Test Conclusion] = [ Two Conclusion] then "Match"
else "Unmatched"
Endif

Raj
16 - Nebula

Just replace 'then' after "Detailed" with 'And' and this will work

If [Type] = "Detailed" AND [Test Conclusion] = [ One Conclusion] then "Match" elseif [Type] = "Overall" AND [Test Conclusion] = [ Two Conclusion] then "Match" else "Unmatched" Endif

Qiu
21 - Polaris
21 - Polaris

@wonka1234 
I think @Raj and @alexnajm are giving the correct formula.
I have changed your input a bit so we can observe if the formula is working or not.

1222-wonka1234.png

Labels
Top Solution Authors