Free Trial

Alteryx Designer Desktop Discussions

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

Compare two fields return data value

sk1800
5 - Atom

Hi,

 

I'm a bit confused/stuck how to do this.

 

I have 2 fields from individual datasets. Field 2 can contain 0's along with nulls and regular integers while Field 1 only has null and non 0 values

 

Field 1          Field 2

null                null

1                    1

                      0

 

I want to return a TRUE message if there is a value in one field and not the other. For example

 

field1   field 2   value

8231    21389   TRUE

 null          0       FALSE

21893     null     TRUE

1               0       TRUE

null          null     FALSE

 

Thank you.

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @sk1800 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1631553053485.png

 

Hope this helps : )

 

sk1800
5 - Atom

Hi-

 

Where I'm stuck is comparing the field to the other field. So the TRUE and false is dictated by if there is a value in the other field not just the one column

atcodedog05
22 - Nova
22 - Nova

Hi @sk1800 

 

I was able to replicate your expected output using below formula.

 

Workflow:

atcodedog05_0-1631553538360.png

 

If this is not correct can you please explain me the complete logic.

 

Hope this helps : )

 

sk1800
5 - Atom

Hi! thanks so much for your help. 

 

So the logic is comparing the data in two seperate columns (refer to my original post). There are three data values possible "0", "null", and any other numerical value for example "1234"

 

So in the example below I'm comparing the data of 0 in one field to an actual numerical value of 12893 in field 2 returning false.

 

Field 1   Field 2   Value

0           21321     FALSE

 

Another example matching data types so true

Field 1  Field 2  value

null       null        true

 

Let me know if it makes sense

atcodedog05
22 - Nova
22 - Nova

Hi @sk1800 

 

Sorry, Still bit confused 😅

sk1800
5 - Atom

sk1800_0-1631555877747.png

 

Does that help?

Labels
Top Solution Authors