Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Compare data in multiple fields while ignoring null values

BDickson
5 - Atom

I am trying to compare the values in four different columns to determine if all of the non-null values are the same. I was considering using a nested IF-THEN formula but due to the number of permutations I keep getting lost.  Is there a simpler solution?  I have attached a sample file with my data and the table below shows what I hope to achieve.

 

 

Client CodeClient NameSource 1Source 2Source 3Source 4Desired Result
CST1Customer 12020nullnullValid
CST2Customer 220null20 nullValid
CST3Customer 320nullnull20Valid
CST4Customer 420nullnullnullValid
CST5Customer 520 nullnull15Review
CST6Customer 620201520Review
CST7Customer 7nullnull1520Review

 

Thanks.

Bruce

7 REPLIES 7
JoBen
11 - Bolide

Hi @BDickson, here is a way that you could do it. Hope this helps :)

Help2.PNGHelp1.PNG

BDickson
5 - Atom

Thanks you for the quick response and the solution.

JoBen
11 - Bolide

Okay. You bet!

w_chivers
7 - Meteor

Hi JoBen, thanks for again for sharing your knowledge. 

 

Could this workflow be amended to compare text values? 

 

e.g. 

Customer CodeCustomer NameSource 1Source 2Source 3Result
CST1Customer 1KFC[null]KFCValid
CST2Customer 2SubwaySub way[null]Check
CST3Customer 3McDonalds[null][null]Valid

 

Cheers, Will

JoBen
11 - Bolide

Hi @w_chivers, yes, this could be reconfigured to compare text values. Here is my workflow using the example that you have below, which I've also attached for you. Let me know if you have any issues. Cheers!

Help2.PNG

Help1.PNG

 

 

 

w_chivers
7 - Meteor

Amazing!  Thank you, JoBen. 

 

This is perfect - really appreciate the time you've taken to reply to this.

 

Thanks again. - Will

JoBen
11 - Bolide

Okay. You bet!

Labels
Top Solution Authors