Alteryx Designer Desktop Discussions

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

How to do a 4 way column compare?

wonka1234
10 - Fireball

How do I compare these 4 columns?

I want a column to show 0 if all 4 of the value columns are equal.

 

wonka1234_2-1657724976784.png

 

13 REPLIES 13
Robin_McIntosh
11 - Bolide

If/Then/Esle

 

Robin_McIntosh_0-1657725405095.png

 

 

wonka1234
10 - Fireball

@Robin_McIntosh 

 

thanks robin, but what if a column has 0 already? How can I account for that? 

Ie the value 4th column has a 0, i want the new col to show 0 still if one of the comparison columns have 0.

Emmanuel_G
13 - Pulsar

Hi @wonka1234  ,

 

Do you want something like this ?

 

Emmanuel_G_0-1657727360177.png

 

wonka1234
10 - Fireball

@Emmanuel_G  

 

Yes - but i prefer the output to be "pass" or "fail" 

also it will just be comparing numbers

but also there could be 0's in the comparison columns!

Robin_McIntosh
11 - Bolide

@wonka1234 - Could there be more than 1 col that is already 0?  For instance can Col1 be > 0 and the other 3 cols = 0?

 

wonka1234
10 - Fireball

@Robin_McIntosh  Yes. Any of the 4 comparison columns could have 0.

Emmanuel_G
13 - Pulsar

@wonka1234 ,

 

Try watching this and tell me if this is the output you want.

 

Emmanuel_G_0-1657728493977.png

 

 

Emmanuel_G
13 - Pulsar

@wonka1234  I just edited in the test above to do an OK comparison test if there is 0 only in the 4 fields.

wonka1234
10 - Fireball

@Emmanuel_G 

Thanks, see the highlight in red, should be pass. IF the values are the same OR values are same and has a 0 in any column then Pass, if not the same, faill.

wonka1234_0-1657731923457.png

 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels